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
a3d1cac4
Commit
a3d1cac4
authored
Jul 15, 2012
by
Nick Coghlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #15230: Update runpy docs to clarify a couple of points that came up in this issue
parent
761bb113
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
Doc/library/runpy.rst
Doc/library/runpy.rst
+11
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Doc/library/runpy.rst
View file @
a3d1cac4
...
@@ -14,6 +14,15 @@ importing them first. Its main use is to implement the :option:`-m` command
...
@@ -14,6 +14,15 @@ importing them first. Its main use is to implement the :option:`-m` command
line
switch
that
allows
scripts
to
be
located
using
the
Python
module
line
switch
that
allows
scripts
to
be
located
using
the
Python
module
namespace
rather
than
the
filesystem
.
namespace
rather
than
the
filesystem
.
Note
that
this
is
*
not
*
a
sandbox
module
-
all
code
is
executed
in
the
current
process
,
and
any
side
effects
(
such
as
cached
imports
of
other
modules
)
will
remain
in
place
after
the
functions
have
returned
.
Furthermore
,
any
functions
and
classes
defined
by
the
executed
code
are
not
guaranteed
to
work
correctly
after
a
:
mod
:`
runpy
`
function
has
returned
.
If
that
limitation
is
not
acceptable
for
a
given
use
case
,
:
mod
:`
importlib
`
is
likely
to
be
a
more
suitable
choice
than
this
module
.
The
:
mod
:`
runpy
`
module
provides
two
functions
:
The
:
mod
:`
runpy
`
module
provides
two
functions
:
...
@@ -141,3 +150,5 @@ The :mod:`runpy` module provides two functions:
...
@@ -141,3 +150,5 @@ The :mod:`runpy` module provides two functions:
PEP written and implemented by Nick Coghlan.
PEP written and implemented by Nick Coghlan.
:ref:`using-on-general` - CPython command line details
:ref:`using-on-general` - CPython command line details
The :func:`importlib.import_module` function
Misc/NEWS
View file @
a3d1cac4
...
@@ -384,6 +384,9 @@ Build
...
@@ -384,6 +384,9 @@ Build
Documentation
Documentation
-------------
-------------
- Issue #15230: Clearly document some of the limitations of the runpy
module and nudge readers towards importlib when appropriate.
- Issue #13557: Clarify effect of giving two different namespaces to exec or
- Issue #13557: Clarify effect of giving two different namespaces to exec or
execfile().
execfile().
...
...
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