We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4350f48 commit 6b19405Copy full SHA for 6b19405
1 file changed
implement-cowsay/cow.py
@@ -0,0 +1,18 @@
1
+import argparse
2
+import cowsay
3
+
4
+parser = argparse.ArgumentParser(description="Make animals say things")
5
6
+parser.add_argument("message", nargs="+", help="the message to say.")
7
8
+parser.add_argument("message", nargs="+", help="The message to say.")
9
10
+parser.add_argument("--animal",
11
+choices=cowsay.char_names,
12
+help="The animal to be saying things.")
13
14
+args = parser.parse_args()
15
+message = " ".join(args.message)
16
+args.animal == None
17
+animal = args.animal or "cow"
18
+(getattr(cowsay, animal)(message))
0 commit comments