mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
bpo-34913: Document gzip command line interface (GH-9782)
This commit is contained in:
parent
e8bbc52deb
commit
7c817e620b
2 changed files with 36 additions and 0 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Add documentation about the new command line interface of the gzip module.
|
||||
Loading…
Add table
Add a link
Reference in a new issue