This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | gpolo |
|---|---|
| Recipients | georg.brandl, gpolo, madarche |
| Date | 2008年03月27日.11:22:29 |
| SpamBayes Score | 0.0074044787 |
| 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:31 | gpolo | set | spambayes_score: 0.00740448 -> 0.0074044787 recipients: + gpolo, georg.brandl, madarche |
| 2008年03月27日 11:22:30 | gpolo | set | spambayes_score: 0.00740448 -> 0.00740448 messageid: <1206616950.84.0.432746752664.issue2406@psf.upfronthosting.co.za> |
| 2008年03月27日 11:22:30 | gpolo | link | issue2406 messages |
| 2008年03月27日 11:22:29 | gpolo | create | |