Skip to content

Commit dc40f86

Browse files
committed
pythongh-109435: Add Doc/library/cmdline.rst
Document modules providing a command-line interface (CLI).
1 parent 74c72a2 commit dc40f86

File tree

7 files changed

+45
-0
lines changed

7 files changed

+45
-0
lines changed

Doc/library/asyncio.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Additionally, there are **low-level** APIs for
5656
* :ref:`bridge <asyncio-futures>` callback-based libraries and code
5757
with async/await syntax.
5858

59+
.. _asyncio-cli:
60+
5961
You can experiment with an ``asyncio`` concurrent context in the REPL:
6062

6163
.. code-block:: pycon

Doc/library/cmdline.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
++++++++++++++++++++++++++++++++++++
2+
Modules command-line interface (CLI)
3+
++++++++++++++++++++++++++++++++++++
4+
5+
The following modules have a command-line interface.
6+
7+
* :ref:`ast <ast-cli>`
8+
* :ref:`asyncio <asyncio-cli>`
9+
* :mod:`base64`
10+
* :ref:`calendar <calendar-cli>`
11+
* :ref:`compileall <compileall-cli>`
12+
* :mod:`ensurepip`
13+
* :ref:`gzip <gzip-cli>`
14+
* idlelib
15+
* :ref:`json.tool <json-commandline>`
16+
* :mod:`pdb`
17+
* :ref:`profile <profile-cli>`
18+
* :ref:`py_compile <py_compile-cli>`
19+
* :mod:`quopri`
20+
* :ref:`site <site-commandline>`
21+
* :ref:`sqlite3 <sqlite3-cli>`
22+
* :mod:`tabnanny`
23+
* :ref:`tarfile <tarfile-commandline>`
24+
* :ref:`timeit <timeit-command-line-interface>`
25+
* :ref:`tokenize <tokenize-cli>`
26+
* :ref:`trace <trace-cli>`
27+
* :mod:`turtledemo`
28+
* :ref:`uuid <uuid-cli>`
29+
* :ref:`unittest <unittest-command-line-interface>`
30+
* :mod:`venv`
31+
* :mod:`webbrowser`
32+
* :ref:`zipapp <zipapp-command-line-interface>`
33+
* :ref:`zipfile <zipfile-commandline>`
34+
35+
See also the :ref:`Python command-line interface <using-on-general>`.

Doc/library/compileall.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ have write permission to the library directories.
1616

1717
.. include:: ../includes/wasm-notavail.rst
1818

19+
.. _compileall-cli:
20+
1921
Command-line use
2022
----------------
2123

Doc/library/gzip.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ Example of how to GZIP compress a binary string::
250250

251251
.. program:: gzip
252252

253+
.. _gzip-cli:
254+
253255
Command Line Interface
254256
----------------------
255257

Doc/library/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,6 @@ the `Python Package Index <https://pypi.org>`_.
7373
language.rst
7474
windows.rst
7575
unix.rst
76+
cmdline.rst
7677
superseded.rst
7778
security_warnings.rst

Doc/library/profile.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ results to a file by specifying a filename to the :func:`run` function::
121121
The :class:`pstats.Stats` class reads profile results from a file and formats
122122
them in various ways.
123123

124+
.. _profile-cli:
125+
124126
The files :mod:`cProfile` and :mod:`profile` can also be invoked as a script to
125127
profile another script. For example::
126128

Doc/library/py_compile.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ byte-code cache files in the directory containing the source code.
125125
This option is useful when the ``.pycs`` are kept up to date by some
126126
system external to Python like a build system.
127127

128+
.. _py_compile-cli:
128129

129130
Command-Line Interface
130131
----------------------

0 commit comments

Comments
 (0)