diff options
author | Georg Brandl <georg@python.org> | 2013-10-06 17:34:19 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-10-06 17:34:19 (GMT) |
commit | fd115517100db5e868ef0c954f1191408687f21f (patch) | |
tree | ae1f3636f7ab1ee5ee70c08bdaec9cec3e3ce4b1 /Doc/library/argparse.rst | |
parent | aca718e9f1f1f5193a6a6a20abd06150b0e34b86 (diff) | |
parent | 29fc4bf5c7b54bcbebd0f41796a2a28c3dc56d79 (diff) | |
download | cpython-fd115517100db5e868ef0c954f1191408687f21f.zip cpython-fd115517100db5e868ef0c954f1191408687f21f.tar.gz cpython-fd115517100db5e868ef0c954f1191408687f21f.tar.bz2 |
merge with 3.3
Diffstat (limited to 'Doc/library/argparse.rst')
-rw-r--r-- | Doc/library/argparse.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 569cb90..5b7d016 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -46,7 +46,7 @@ produces either the sum or the max:: Assuming the Python code above is saved into a file called ``prog.py``, it can be run at the command line and provides useful help messages:: - $ prog.py -h + $ python prog.py -h usage: prog.py [-h] [--sum] N [N ...] Process some integers. @@ -61,15 +61,15 @@ be run at the command line and provides useful help messages:: When run with the appropriate arguments, it prints either the sum or the max of the command-line integers:: - $ prog.py 1 2 3 4 + $ python prog.py 1 2 3 4 4 - $ prog.py 1 2 3 4 --sum + $ python prog.py 1 2 3 4 --sum 10 If invalid arguments are passed in, it will issue an error:: - $ prog.py a b c + $ python prog.py a b c usage: prog.py [-h] [--sum] N [N ...] prog.py: error: argument N: invalid int value: 'a' |