diff options
| author | Nick Coghlan <ncoghlan@gmail.com> | 2010-08-17 13:06:11 +0000 |
|---|---|---|
| committer | Nick Coghlan <ncoghlan@gmail.com> | 2010-08-17 13:06:11 +0000 |
| commit | d26c18adccf02321592cd58a2dadb0ab68af6906 (patch) | |
| tree | 0429b57ab0d5cc0b36ca68af24f382c888cbcf9c /Doc/using | |
| parent | 46e63805638e0fac20aeae837e1f93b4a675446a (diff) | |
| download | cpython-git-d26c18adccf02321592cd58a2dadb0ab68af6906.tar.gz | |
Issue #8202: Set sys.argv[0] to -m rather than -c while searching for the module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory
Diffstat (limited to 'Doc/using')
| -rw-r--r-- | Doc/using/cmdline.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 3d10c9d68b..304f7c91d3 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:: |
