mirror of
https://github.com/python/cpython.git
synced 2026-06-28 20:00:46 +00:00
[3.15] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150614)
(cherry picked from commit 9baa7c63be)
Co-authored-by: Dhruv Singla <68206552+d-s-dc@users.noreply.github.com>
This commit is contained in:
parent
b952986ced
commit
e4cdee6c19
1 changed files with 4 additions and 4 deletions
|
|
@ -50,8 +50,8 @@ additional methods of invocation:
|
|||
* When called with ``-c command``, it executes the Python statement(s) given as
|
||||
*command*. Here *command* may contain multiple statements separated by
|
||||
newlines.
|
||||
* When called with ``-m module-name``, the given module is located on the
|
||||
Python module path and executed as a script.
|
||||
* When called with ``-m module-name``, the given module is located using the standard
|
||||
import mechanism and executed as a script.
|
||||
|
||||
In non-interactive mode, the entire input is parsed before it is executed.
|
||||
|
||||
|
|
@ -78,8 +78,8 @@ source.
|
|||
|
||||
.. option:: -m <module-name>
|
||||
|
||||
Search :data:`sys.path` for the named module and execute its contents as
|
||||
the :mod:`__main__` module.
|
||||
Locate the module using the standard import mechanism and execute its contents
|
||||
as the :mod:`__main__` module.
|
||||
|
||||
Since the argument is a *module* name, you must not give a file extension
|
||||
(``.py``). The module name should be a valid absolute Python module name, but
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue