pyguymer3.tar

pyguymer3.tar(tarName, fnames, /, *, cwd=None, stderr=None, stdout=None, tarPath=None, timeout=60.0)[source]

Create a PAX formatted TAR file (without any frills or size limits).

Parameters:
  • tarName (str) – the name of the TAR file to create

  • fnames (list of str) – the list of files to put in the TAR file

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

  • 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)

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

  • 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/tarfile.html

Copyright 2017 Thomas Guymer [1]

References