Author gpolo
Recipients georg.brandl, gpolo, madarche
Date 2008-03-27.11:22:29
SpamBayes Score 0.00740448
Marked as misclassified No
Message-id <1206616950.84.0.432746752664.issue2406@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

(some comments)

What about using gzip.open instead of GzipFile ? It is just a shorthand,
but I prefer it (just my opinion). Also, remove those semicolons.

At the second example you called close on the string object, I guess you
intended to do file_obj.close()

In the third example you used "file", please change that to "open". In
this sample example, you don't need to use shutil. I suggest changing it to:

import gzip
f_in = open('/home/joe/file.txt', 'rb')
f_out = gzip.open('/home/joe/file.txt.gz', 'wb');
f_out.writelines(f_in)
file_obj_out.close()
f_out.close()

Finally, consider doing these changes against Doc/library/gzip.rst and
sending the diff
History
Date User Action Args
2008-03-27 11:22:31gpolosetspambayes_score: 0.00740448 -> 0.00740448
recipients: + gpolo, georg.brandl, madarche
2008-03-27 11:22:30gpolosetspambayes_score: 0.00740448 -> 0.00740448
messageid: <1206616950.84.0.432746752664.issue2406@psf.upfronthosting.co.za>
2008-03-27 11:22:30gpololinkissue2406 messages
2008-03-27 11:22:29gpolocreate