Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Using gzip module (See related posts)

Modified from this funny thread in c.l.p
http://groups.google.co.uk/group/comp.lang.python/msg/e53361331c23fd76

import gzip

zfile = gzip.GzipFile('somefile.gz')
content = zfile.read()
zfile.close()

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts