File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -45,32 +45,33 @@ If given no arguments, it should print a brief usage:
4545
4646```
4747$ ./gashlycrumb.py
48- usage: gashlycrumb.py [-h] [-f str] str [str ...]
49- gashlycrumb.py: error: the following arguments are required: str
48+ usage: gashlycrumb.py [-h] [-f FILE] letter [letter ...]
49+ gashlycrumb.py: error: the following arguments are required: letter
5050```
5151
5252Or a longer usage for ` -h ` or ` --help ` :
5353
5454```
5555$ ./gashlycrumb.py -h
56- usage: gashlycrumb.py [-h] [-f str] str [str ...]
56+ usage: gashlycrumb.py [-h] [-f FILE] letter [letter ...]
5757
5858Gashlycrumb
5959
6060positional arguments:
61- str Letter(s)
61+ letter Letter(s)
6262
6363optional arguments:
64- -h, --help show this help message and exit
65- -f str , --file str Input file (default: gashlycrumb.txt)
64+ -h, --help show this help message and exit
65+ -f FILE , --file FILE Input file (default: gashlycrumb.txt)
6666```
6767
6868The program should reject a bad ` --file ` argument:
6969
7070```
7171$ ./gashlycrumb.py -f alskdf
7272usage: gashlycrumb.py [-h] [-f str] str [str ...]
73- gashlycrumb.py: error: argument -f/--file: can't open 'alskdf': [Errno 2] No such file or directory: 'alskdf'
73+ gashlycrumb.py: error: argument -f/--file: can't open 'alskdf': \
74+ [Errno 2] No such file or directory: 'alskdf'
7475```
7576
7677Run the test suite to ensure your program is correct:
You can’t perform that action at this time.
0 commit comments