Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b02038

Browse files
committed
corrected help
1 parent 2ed03b1 commit 7b02038

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

07_gashlycrumb/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff 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

5252
Or 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
5858
Gashlycrumb
5959
6060
positional arguments:
61-
str Letter(s)
61+
letter Letter(s)
6262
6363
optional 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

6868
The program should reject a bad `--file` argument:
6969

7070
```
7171
$ ./gashlycrumb.py -f alskdf
7272
usage: 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

7677
Run the test suite to ensure your program is correct:

0 commit comments

Comments
 (0)