File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Misc/NEWS.d/next/Documentation Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -211,3 +211,38 @@ Example of how to GZIP compress a binary string::
211
211
The basic data compression module needed to support the :program: `gzip ` file
212
212
format.
213
213
214
+ Command Line Interface
215
+ ----------------------
216
+
217
+ The :mod: `gzip ` module provides a simple command line interface to compress or
218
+ decompress files.
219
+
220
+ Once executed the :mod: `gzip ` module keeps the input file(s).
221
+
222
+ .. versionchanged :: 3.8
223
+
224
+ Add a new command line interface with a usage.
225
+
226
+ Command line options
227
+ ^^^^^^^^^^^^^^^^^^^^
228
+
229
+ .. cmdoption :: file
230
+
231
+ .. code-block :: shell-session
232
+
233
+ $ python -m gzip file
234
+
235
+ If *file * is not specified, read from :attr: `sys.stdin `.
236
+
237
+ .. cmdoption :: -d, --decompress
238
+
239
+ Decompress the given file
240
+
241
+ .. code-block :: shell-session
242
+
243
+ $ python -m gzip -d file.gz
244
+
245
+ .. cmdoption :: -h, --help
246
+
247
+ Show the help message.
248
+
Original file line number Diff line number Diff line change
1
+ Add documentation about the new command line interface of the gzip module.
You can’t perform that action at this time.
0 commit comments