python-zstandard icon indicating copy to clipboard operation
python-zstandard copied to clipboard

Provide runpy invocation in Python lib

Open jaraco opened this issue 3 years ago • 1 comments

It would be nice if there were a way to invoke python -m zstandard and get behavior similar to python -m zipfile or even better something like what the tar command offers. The primary use-case would be to enable decompressing and extracting all files from a .tar.zst without needing to copy several lines of Python, lines which can't be re-written as as a series of expressions as a parameter to python -c.

I'd be happy with just support for -e <zst_file> [output_dir].

jaraco avatar Nov 14 '22 20:11 jaraco

I've published jaraco.zstd. Now all anyone has to do is put wheels for both zstardard and jaraco.zstd on their PYTHONPATH and then run py -m jaraco.zstd -e filename --out-dir /tmp... or if they have pip-run: pip-run -q jaraco.zstd -- -m jaraco.zstd -e filename --out-dir /tmp. I'd prefer to retire that package in favor of a built-in implementation.

jaraco avatar Nov 14 '22 21:11 jaraco