diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-03-14 18:52:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 18:52:27 (GMT) |
commit | df38f7c577206bc82090222f36529db680285478 (patch) | |
tree | d565ef1b228b7252ba0734be1b62ceec9e4ef135 | |
parent | 2c015a674d9f983cec0bac627e09ca3e12631bca (diff) | |
download | cpython-df38f7c577206bc82090222f36529db680285478.zip cpython-df38f7c577206bc82090222f36529db680285478.tar.gz cpython-df38f7c577206bc82090222f36529db680285478.tar.bz2 |
[3.10] gh-102354: change python3 to python in docs examples (GH-102696) (#102698)
gh-102354: change python3 to python in docs examples (GH-102696)
(cherry picked from commit 80abd62647b2a36947a11a6a8e395061be6f0c61)
Co-authored-by: Paul Watson <paul.hermeneutic@gmail.com>
-rw-r--r-- | Doc/library/__main__.rst | 2 | ||||
-rw-r--r-- | Doc/library/importlib.metadata.rst | 2 | ||||
-rw-r--r-- | Doc/library/pdb.rst | 4 | ||||
-rw-r--r-- | Doc/tutorial/venv.rst | 2 | ||||
-rw-r--r-- | Doc/using/venv-create.inc | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/__main__.rst b/Doc/library/__main__.rst index d0a65e7..0a93efa 100644 --- a/Doc/library/__main__.rst +++ b/Doc/library/__main__.rst @@ -259,7 +259,7 @@ one mentioned below are preferred. See :mod:`venv` for an example of a package with a minimal ``__main__.py`` in the standard library. It doesn't contain a ``if __name__ == '__main__'`` - block. You can invoke it with ``python3 -m venv [directory]``. + block. You can invoke it with ``python -m venv [directory]``. See :mod:`runpy` for more details on the :option:`-m` flag to the interpreter executable. diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst index c4c4a7d..56ce8d9 100644 --- a/Doc/library/importlib.metadata.rst +++ b/Doc/library/importlib.metadata.rst @@ -41,7 +41,7 @@ something into it: .. code-block:: shell-session - $ python3 -m venv example + $ python -m venv example $ source example/bin/activate (example) $ pip install wheel diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index c87e327..3b4a57d 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -58,7 +58,7 @@ of the debugger is:: :file:`pdb.py` can also be invoked as a script to debug other scripts. For example:: - python3 -m pdb myscript.py + python -m pdb myscript.py When invoked as a script, pdb will automatically enter post-mortem debugging if the program being debugged exits abnormally. After post-mortem debugging (or @@ -72,7 +72,7 @@ useful than quitting the debugger upon program's exit. .. versionadded:: 3.7 :file:`pdb.py` now accepts a ``-m`` option that execute modules similar to the way - ``python3 -m`` does. As with a script, the debugger will pause execution just + ``python -m`` does. As with a script, the debugger will pause execution just before the first line of the module. diff --git a/Doc/tutorial/venv.rst b/Doc/tutorial/venv.rst index 2cc30f8..1e268df 100644 --- a/Doc/tutorial/venv.rst +++ b/Doc/tutorial/venv.rst @@ -44,7 +44,7 @@ whichever version you want. To create a virtual environment, decide upon a directory where you want to place it, and run the :mod:`venv` module as a script with the directory path:: - python3 -m venv tutorial-env + python -m venv tutorial-env This will create the ``tutorial-env`` directory if it doesn't exist, and also create directories inside it containing a copy of the Python diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc index 0422cd2..9f25563 100644 --- a/Doc/using/venv-create.inc +++ b/Doc/using/venv-create.inc @@ -1,7 +1,7 @@ Creation of :ref:`virtual environments <venv-def>` is done by executing the command ``venv``:: - python3 -m venv /path/to/new/virtual/environment + python -m venv /path/to/new/virtual/environment Running this command creates the target directory (creating any parent directories that don't exist already) and places a ``pyvenv.cfg`` file in it |