diff options
author | Stéphane Wirtel <stephane@wirtel.be> | 2018-10-10 06:28:26 (GMT) |
---|---|---|
committer | Julien Palard <julien@palard.fr> | 2018-10-10 06:28:26 (GMT) |
commit | 7c817e620be9013466d4dd008a2f1dbffcf7517e (patch) | |
tree | 773f0a3081eb04f601e5a8fba5eb48b730e26000 /Doc/library/gzip.rst | |
parent | e8bbc52debfd1b28517946d65db257e6b6d92e29 (diff) | |
download | cpython-7c817e620be9013466d4dd008a2f1dbffcf7517e.zip cpython-7c817e620be9013466d4dd008a2f1dbffcf7517e.tar.gz cpython-7c817e620be9013466d4dd008a2f1dbffcf7517e.tar.bz2 |
bpo-34913: Document gzip command line interface (GH-9782)
Diffstat (limited to 'Doc/library/gzip.rst')
-rw-r--r-- | Doc/library/gzip.rst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst index 9c6b722..b52dd1a 100644 --- a/Doc/library/gzip.rst +++ b/Doc/library/gzip.rst @@ -211,3 +211,38 @@ Example of how to GZIP compress a binary string:: The basic data compression module needed to support the :program:`gzip` file format. +Command Line Interface +---------------------- + +The :mod:`gzip` module provides a simple command line interface to compress or +decompress files. + +Once executed the :mod:`gzip` module keeps the input file(s). + +.. versionchanged:: 3.8 + + Add a new command line interface with a usage. + +Command line options +^^^^^^^^^^^^^^^^^^^^ + +.. cmdoption:: file + + .. code-block:: shell-session + + $ python -m gzip file + + If *file* is not specified, read from :attr:`sys.stdin`. + +.. cmdoption:: -d, --decompress + + Decompress the given file + + .. code-block:: shell-session + + $ python -m gzip -d file.gz + +.. cmdoption:: -h, --help + + Show the help message. + |