PyDocs

Nav

Command-line interface libraries

hook_compressed

fileinput

function (source)
  • hook_compressed(filename, mode, *, encoding=None, errors=None)
Transparently opens files compressed with gzip and bzip2 (recognized by the extensions '.gz' and '.bz2') using the gzip and bz2 modules. If the filename extension is not '.gz' or '.bz2', the file is opened normally (ie, using open() without any decompression).
Changed in 3.10
  • 3.10: The keyword-only parameter encoding and errors are added.
0 Examples
No examples for fileinput/hook_compressed.
See Also
No see-alsos for fileinput/hook_compressed
0 Notes
No notes for hook_compressed