There was an error while loading. Please reload this page.
1 parent dca5b86 commit a396463Copy full SHA for a396463
1 file changed
Doc/tutorial/interpreter.rst
@@ -78,8 +78,9 @@ Argument Passing
78
----------------
79
80
When known to the interpreter, the script name and additional arguments
81
-thereafter are passed to the script in the variable ``sys.argv``, which is a
82
-list of strings. Its length is at least one; when no script and no arguments
+thereafter are turned into a list of strings and assigned to the ``argv``
+variable in the ``sys`` module. You can access this list by executing ``import
83
+sys``. The length of the list is at least one; when no script and no arguments
84
are given, ``sys.argv[0]`` is an empty string. When the script name is given as
85
``'-'`` (meaning standard input), ``sys.argv[0]`` is set to ``'-'``. When
86
:option:`-c` *command* is used, ``sys.argv[0]`` is set to ``'-c'``. When
0 commit comments