Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8d0cfd6

Browse filesBrowse files
committed
gh-109435: Add Doc/library/cmdline.rst
Document modules providing a command-line interface (CLI).
1 parent f65497f commit 8d0cfd6
Copy full SHA for 8d0cfd6

File tree

Expand file treeCollapse file tree

9 files changed

+70
-0
lines changed
Filter options
Expand file treeCollapse file tree

9 files changed

+70
-0
lines changed

‎Doc/library/asyncio.rst

Copy file name to clipboardExpand all lines: Doc/library/asyncio.rst
+2Lines 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

Copy file name to clipboard
+57Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
* :mod:`code`
12+
* :ref:`compileall <compileall-cli>`
13+
* :mod:`cProfile`: see :ref:`profile <profile-cli>`
14+
* :ref:`difflib <difflib-interface>`
15+
* :mod:`dis`
16+
* :mod:`doctest`
17+
* :mod:`!encodings.rot_13`
18+
* :mod:`ensurepip`
19+
* :mod:`filecmp`
20+
* :mod:`fileinput`
21+
* :mod:`ftplib`
22+
* :ref:`gzip <gzip-cli>`
23+
* :ref:`http.server <http-server-cli>`
24+
* :mod:`!idlelib`
25+
* :ref:`inspect <inspect-module-cli>`
26+
* :ref:`json.tool <json-commandline>`
27+
* :mod:`mimetypes`
28+
* :mod:`pdb`
29+
* :mod:`pickle`
30+
* :ref:`pickletools <pickletools-cli>`
31+
* :mod:`platform`
32+
* :mod:`poplib`
33+
* :ref:`profile <profile-cli>`
34+
* :mod:`pstats`
35+
* :ref:`py_compile <py_compile-cli>`
36+
* :mod:`pyclbr`
37+
* :mod:`pydoc`
38+
* :mod:`quopri`
39+
* :mod:`runpy`
40+
* :ref:`site <site-commandline>`
41+
* :ref:`sqlite3 <sqlite3-cli>`
42+
* :ref:`sysconfig <sysconfig-cli>`
43+
* :mod:`tabnanny`
44+
* :ref:`tarfile <tarfile-commandline>`
45+
* :mod:`!this`
46+
* :ref:`timeit <timeit-command-line-interface>`
47+
* :ref:`tokenize <tokenize-cli>`
48+
* :ref:`trace <trace-cli>`
49+
* :mod:`turtledemo`
50+
* :ref:`unittest <unittest-command-line-interface>`
51+
* :ref:`uuid <uuid-cli>`
52+
* :mod:`venv`
53+
* :mod:`webbrowser`
54+
* :ref:`zipapp <zipapp-command-line-interface>`
55+
* :ref:`zipfile <zipfile-commandline>`
56+
57+
See also the :ref:`Python command-line interface <using-on-general>`.

‎Doc/library/compileall.rst

Copy file name to clipboardExpand all lines: Doc/library/compileall.rst
+2Lines 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

Copy file name to clipboardExpand all lines: Doc/library/gzip.rst
+2Lines 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

Copy file name to clipboardExpand all lines: Doc/library/index.rst
+1Lines 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/pickletools.rst

Copy file name to clipboardExpand all lines: Doc/library/pickletools.rst
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ are useful for Python core developers who are working on the :mod:`pickle`;
1717
ordinary users of the :mod:`pickle` module probably won't find the
1818
:mod:`pickletools` module relevant.
1919

20+
.. _pickletools-cli:
21+
2022
Command line usage
2123
------------------
2224

‎Doc/library/profile.rst

Copy file name to clipboardExpand all lines: Doc/library/profile.rst
+2Lines 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

Copy file name to clipboardExpand all lines: Doc/library/py_compile.rst
+1Lines 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
----------------------

‎Doc/library/sysconfig.rst

Copy file name to clipboardExpand all lines: Doc/library/sysconfig.rst
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ Other functions
278278

279279
Return the path of :file:`Makefile`.
280280

281+
.. _sysconfig-cli:
281282

282283
Using :mod:`sysconfig` as a script
283284
----------------------------------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.