Skip to content

Commit

Permalink
[3.10] gh-102354: change python3 to python in docs examples (GH-102696)…
Browse files Browse the repository at this point in the history
… (#102698)

gh-102354: change python3 to python in docs examples (GH-102696)
(cherry picked from commit 80abd62)

Co-authored-by: Paul Watson <paul.hermeneutic@gmail.com>
  • Loading branch information
miss-islington and Liturgist committed Mar 14, 2023
1 parent 2c015a6 commit df38f7c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Doc/library/__main__.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/importlib.metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/pdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.


Expand Down
2 changes: 1 addition & 1 deletion Doc/tutorial/venv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/using/venv-create.inc
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit df38f7c

Please sign in to comment.