]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Tutorial sys.argv example should not have interactive prompt (GH-94880)
authorMarco Buttu <marco.buttu@gmail.com>
Sat, 16 Jul 2022 02:10:19 +0000 (04:10 +0200)
committerGitHub <noreply@github.com>
Sat, 16 Jul 2022 02:10:19 +0000 (21:10 -0500)
Doc/tutorial/stdlib.rst

index b32a552d5570cf1bc929338591ca3418ba7ee109..4f5ada90eb57bc784a901c137ed8810883c733ac 100644 (file)
@@ -65,11 +65,15 @@ Command Line Arguments
 
 Common utility scripts often need to process command line arguments. These
 arguments are stored in the :mod:`sys` module's *argv* attribute as a list.  For
-instance the following output results from running ``python demo.py one two
-three`` at the command line::
+instance, let's take the following :file:`demo.py` file::
+
+   # File demo.py
+   import sys
+   print(sys.argv)
+
+Here is the output from running ``python demo.py one two three`` at the command
+line::
 
-   >>> import sys
-   >>> print(sys.argv)
    ['demo.py', 'one', 'two', 'three']
 
 The :mod:`argparse` module provides a more sophisticated mechanism to process