summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2010-04-28 14:51:08 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2010-04-28 14:51:08 (GMT)
commitc5e448524818df5858e1fe98ce81aeb5ca3a14c4 (patch)
tree27b36363e476e8cee3ff8dcb0e73326eb552c4eb /Doc
parent54677da895fdb4a58b15cf46cadd0659db6eb3e9 (diff)
downloadcpython-c5e448524818df5858e1fe98ce81aeb5ca3a14c4.zip
cpython-c5e448524818df5858e1fe98ce81aeb5ca3a14c4.tar.gz
cpython-c5e448524818df5858e1fe98ce81aeb5ca3a14c4.tar.bz2
Issue 8202: when using the -m command line switch, sys.argv[0] is now '-m' instead of '-c' while searching for the module to be executed
Diffstat (limited to 'Doc')
-rw-r--r--Doc/using/cmdline.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index a444228..0199f9f 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -95,8 +95,9 @@ source.
file is not available.
If this option is given, the first element of :data:`sys.argv` will be the
- full path to the module file. As with the :option:`-c` option, the current
- directory will be added to the start of :data:`sys.path`.
+ full path to the module file (while the module file is being located, the
+ first element will be set to ``"-m"``). As with the :option:`-c` option,
+ the current directory will be added to the start of :data:`sys.path`.
Many standard library modules contain code that is invoked on their execution
as a script. An example is the :mod:`timeit` module::