Take a stab at gzipping some information through the gzip library like this...
import gzip
content = "Lots of content here"
f = gzip.open('Onlyfinnaly.log.gz', 'wb')
f.write(content)
f.close()
Then try to execute your code as posted..
import gzip
f=gzip.open('Onlyfinnaly.log.gz','rb')
file_content=f.read()
print file_content
This technique worked for me concerning some explanation the gzip library neglects to read a few records.
Want to become a expert in Python? Join the python course fast!
For more details, do check out the below video tutorial...