Skip to content

Commit ee78fc7

Browse files
committed
add --help flag message
cow.py --help shows help message explaining the application, as show in proj requirements.
1 parent 5ff78fc commit ee78fc7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cow.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
# parse the args
77
parser = argparse.ArgumentParser(
88
prog="cowsay command line tool",
9-
description="ASCII art of animals saying text supplied as argument")
9+
description="Make animals say things")
1010

11-
parser.add_argument("--animal", choices=cowsay.char_names)
11+
parser.add_argument("--animal", choices=cowsay.char_names, help="The animal to be saying things.")
12+
parser.add_argument("message", nargs='*', help="The message to say")
1213

1314
args = parser.parse_args()
1415
# cowsay.cow(" ".join(sys.argv[1:]))

0 commit comments

Comments
 (0)