[issue21146] update gzip usage examples in docs

Wolfgang Maier report at bugs.python.org
Thu Apr 3 14:44:39 CEST 2014


Wolfgang Maier added the comment:

>> with open(src, 'rb') as f_in:
>>     with gzip.open(dst, 'wb') as f_out:
>>        shutil.copyfileobj(f_in, f_out)

+1 !!
exactly as fast as my suggestion (with compression and de-compression), but a lot clearer !
Hadn't thought of it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21146>
_______________________________________


More information about the Python-bugs-list mailing list