Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3e1c8237
Commit
3e1c8237
authored
Dec 10, 2014
by
Berker Peksag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #12602: Add missing cross-references to runpy and using/cmdline docs.
Patch by Éric Araujo.
parent
a50afa38
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
Doc/library/runpy.rst
Doc/library/runpy.rst
+9
-2
Doc/tutorial/interpreter.rst
Doc/tutorial/interpreter.rst
+2
-0
Doc/using/cmdline.rst
Doc/using/cmdline.rst
+6
-2
No files found.
Doc/library/runpy.rst
View file @
3e1c8237
...
...
@@ -72,6 +72,9 @@ The :mod:`runpy` module provides two functions:
arguments
.
It
is
recommended
that
the
:
mod
:`
sys
`
module
be
left
alone
when
invoking
this
function
from
threaded
code
.
..
seealso
::
The
:
option
:`-
m
`
option
offering
equivalent
functionality
from
the
command
line
.
..
versionchanged
::
2.7
Added
ability
to
execute
packages
by
looking
for
a
``
__main__
``
...
...
@@ -134,14 +137,18 @@ The :mod:`runpy` module provides two functions:
limitations still apply, use of this function in threaded code should be
either serialised with the import lock or delegated to a separate process.
.. seealso::
:ref:`using-on-interface-options` for equivalent functionality on the
command line (``python path/to/script``).
.. versionadded:: 2.7
.. seealso::
:pep:`338` - Executing modules as scripts
:pep:`338` -
-
Executing modules as scripts
PEP written and implemented by Nick Coghlan.
:pep:`366` - Main module explicit relative imports
:pep:`366` -
-
Main module explicit relative imports
PEP written and implemented by Nick Coghlan.
:ref:`using-on-general` - CPython command line details
Doc/tutorial/interpreter.rst
View file @
3e1c8237
...
...
@@ -62,6 +62,8 @@ When a script file is used, it is sometimes useful to be able to run the script
and enter interactive mode afterwards. This can be done by passing :option:`-i`
before the script.
All command-line options are described in :ref:`using-on-general`.
.. _tut-argpassing:
...
...
Doc/using/cmdline.rst
View file @
3e1c8237
.. highlightlang::
none
.. highlightlang::
sh
.. ATTENTION: You probably should update Misc/python.man, too, if you modify
..
this file.
this file.
.. _using-on-general:
...
...
@@ -130,6 +130,10 @@ source.
``"-"`` and the current directory will be added to the start of
:data:`sys.path`.
.. seealso::
:func:`runpy.run_path`
Equivalent functionality directly available to Python code
.. describe:: <script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment