[issue10559] NameError in tutorial/interpreter
Éric Araujo
report at bugs.python.org
Thu Dec 16 02:21:13 CET 2010
Éric Araujo <merwok at netwok.org> added the comment:
New wording:
When known to the interpreter, the script name and additional arguments
thereafter are passed to the script in the variable ``sys.argv``, which is a
-list of strings. Its length is at least one; when no script and no arguments
+list of strings. You have to execute ``import sys`` before you can use that
+list. Its length is at least one; when no script and no arguments
are given, ``sys.argv[0]`` is an empty string. When the script name is given as
``'-'`` (meaning standard input), ``sys.argv[0]`` is set to ``'-'``. When
:option:`-c` *command* is used, ``sys.argv[0]`` is set to ``'-c'``. When
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10559>
_______________________________________
More information about the Python-bugs-list
mailing list