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
b182db44
Commit
b182db44
authored
Mar 17, 2006
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write section
parent
bc45a3f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
Doc/whatsnew/whatsnew25.tex
Doc/whatsnew/whatsnew25.tex
+19
-1
No files found.
Doc/whatsnew/whatsnew25.tex
View file @
b182db44
...
@@ -212,7 +212,25 @@ implemented by Richard Jones and Fred Drake.}
...
@@ -212,7 +212,25 @@ implemented by Richard Jones and Fred Drake.}
%======================================================================
%======================================================================
\section
{
PEP 338: Executing Modules as Scripts
}
\section
{
PEP 338: Executing Modules as Scripts
}
% XXX write this
The
\programopt
{
-m
}
switch added in Python 2.4 to execute a module as
a script gained a few more abilities. Instead of being implemented in
C code inside the Python interpreter, the switch now uses an
implementation in a new module,
\module
{
runpy
}
.
The
\module
{
runpy
}
module implements a more sophisticated import
mechanism so that it's now possible to run modules in a package such
as
\module
{
pychecker.checker
}
. The module also supports alternative
import mechanisms such as the
\module
{
zipimport
}
module. (This means
you can add a .zip archive's path to
\code
{
sys.path
}
and then use the
\programopt
{
-m
}
switch to execute code from the archive.
\begin{seealso}
\seepep
{
338
}{
Executing modules as scripts
}{
PEP written and
implemented by Nick Coghlan.
}
\end{seealso}
%======================================================================
%======================================================================
...
...
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