Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(26991)

Side by Side Diff: Doc/using/cmdline.rst

Issue 14285: Traceback wrong on ImportError while executing a package
Patch Set: Created 3 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/runpy.rst ('k') | Lib/runpy.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 .. highlightlang:: sh 1 .. highlightlang:: sh
2 2
3 .. ATTENTION: You probably should update Misc/python.man, too, if you modify 3 .. ATTENTION: You probably should update Misc/python.man, too, if you modify
4 this file. 4 this file.
5 5
6 .. _using-on-general: 6 .. _using-on-general:
7 7
8 Command line and environment 8 Command line and environment
9 ============================ 9 ============================
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 :data:`sys.path` (allowing modules in that directory to be imported as top 70 :data:`sys.path` (allowing modules in that directory to be imported as top
71 level modules). 71 level modules).
72 72
73 73
74 .. cmdoption:: -m <module-name> 74 .. cmdoption:: -m <module-name>
75 75
76 Search :data:`sys.path` for the named module and execute its contents as 76 Search :data:`sys.path` for the named module and execute its contents as
77 the :mod:`__main__` module. 77 the :mod:`__main__` module.
78 78
79 Since the argument is a *module* name, you must not give a file extension 79 Since the argument is a *module* name, you must not give a file extension
80 (``.py``). The ``module-name`` should be a valid Python module name, but 80 (``.py``). The module name should be a valid absolute Python module name, bu t
81 the implementation may not always enforce this (e.g. it may allow you to 81 the implementation may not always enforce this (e.g. it may allow you to
82 use a name that includes a hyphen). 82 use a name that includes a hyphen).
83 83
84 Package names (including namespace packages) are also permitted. When a 84 Package names (including namespace packages) are also permitted. When a
85 package name is supplied instead 85 package name is supplied instead
86 of a normal module, the interpreter will execute ``<pkg>.__main__`` as 86 of a normal module, the interpreter will execute ``<pkg>.__main__`` as
87 the main module. This behaviour is deliberately similar to the handling 87 the main module. This behaviour is deliberately similar to the handling
88 of directories and zipfiles that are passed to the interpreter as the 88 of directories and zipfiles that are passed to the interpreter as the
89 script argument. 89 script argument.
90 90
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 .. envvar:: PYTHONDUMPREFS 635 .. envvar:: PYTHONDUMPREFS
636 636
637 If set, Python will dump objects and reference counts still alive after 637 If set, Python will dump objects and reference counts still alive after
638 shutting down the interpreter. 638 shutting down the interpreter.
639 639
640 640
641 .. envvar:: PYTHONMALLOCSTATS 641 .. envvar:: PYTHONMALLOCSTATS
642 642
643 If set, Python will print memory allocation statistics every time a new 643 If set, Python will print memory allocation statistics every time a new
644 object arena is created, and on shutdown. 644 object arena is created, and on shutdown.
OLDNEW
« no previous file with comments | « Doc/library/runpy.rst ('k') | Lib/runpy.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+