pyguymer3.gzip

pyguymer3.gzip(fname, /, *, cwd=None, gzipPath=None, stderr=None, stdout=None, timeout=60.0)[source]

Compress a file using “gzip”.

Parameters:
  • fname (str) – the name of the file to compress

  • cwd (str, optional) – the child working directory (default None)

  • gzipPath (str, optional) – the path to the “gzip” binary (if not provided then Python will attempt to find the binary itself)

  • stderr (subprocess.PIPE, subprocess.DEVNULL, io.TextIOWrapper, optional) – the destination of STDERR (default None)

  • stdout (subprocess.PIPE, subprocess.DEVNULL, io.TextIOWrapper, optional) – the destination of STDOUT (default None)

  • timeout (float, optional) – the timeout for any requests/subprocess calls

Notes

I still need to provide justification for using this function over https://docs.python.org/3.12/library/gzip.html

Copyright 2017 Thomas Guymer [1]

References