Python doc problem example: gzip module (reprise)

Byron Rios rianby64 at hotmail.com
Sat Jun 21 19:36:09 EDT 2008


>>> fileToCompress = open('finalcallejon.mb')
>>> fileToStr = fileToCompress.read()
>>> import gzip
>>> fileZipped = gzip.GzipFile('finalcallejon.mb.gz', 'wb', 9)
>>> fileZipped.write(fileToStr)
>>> fileZipped.close()

this may help you in http://mail.python.org/pipermail/python-list/2005-November/349718.html

have a nice day 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080622/76559c84/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Emoticon1.gif
Type: image/gif
Size: 257 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20080622/76559c84/attachment.gif>


More information about the Python-list mailing list