[docs] Mistake - gzip.open

Oleg Tropinin tropinin at iptech.kz
Tue Dec 12 23:10:39 EST 2017


Hi,

Pls replace "open" to "gzip.open" when code open file.txt.


https://docs.python.org/2/library/gzip.html

Example of how to GZIP compress an existing file:

import  gzip
import  shutil
with  _open_('file.txt',  'rb')  as  f_in,  gzip.open('file.txt.gz',  'wb')  as  f_out:
     shutil.copyfileobj(f_in,  f_out)



Regards
Oleg Tropinin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20171213/dda7e8a6/attachment.html>


More information about the docs mailing list