File tree 1 file changed +8
-7
lines changed
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:
45
45
46
46
```
47
47
$ ./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
50
50
```
51
51
52
52
Or a longer usage for ` -h ` or ` --help ` :
53
53
54
54
```
55
55
$ ./gashlycrumb.py -h
56
- usage: gashlycrumb.py [-h] [-f str] str [str ...]
56
+ usage: gashlycrumb.py [-h] [-f FILE] letter [letter ...]
57
57
58
58
Gashlycrumb
59
59
60
60
positional arguments:
61
- str Letter(s)
61
+ letter Letter(s)
62
62
63
63
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)
66
66
```
67
67
68
68
The program should reject a bad ` --file ` argument:
69
69
70
70
```
71
71
$ ./gashlycrumb.py -f alskdf
72
72
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'
74
75
```
75
76
76
77
Run the test suite to ensure your program is correct:
You can’t perform that action at this time.
0 commit comments