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 e328bd5 commit fa8bec8Copy full SHA for fa8bec8
implement-cowsay/cow.py
@@ -0,0 +1,29 @@
1
+import cowsay
2
+import argparse
3
+
4
+parser = argparse.ArgumentParser(
5
+ prog="cowsay",
6
+ description="Make animals say things",
7
+)
8
9
+valid_animal = cowsay.char_names
10
11
+parser.add_argument(
12
+ "--animal",
13
+ choices=valid_animal,
14
+ default="cow",
15
+ help=" The animal to be saying things."
16
17
18
+ "message",
19
+ nargs="+",
20
+ help="The message to say"
21
22
23
+args = parser.parse_args()
24
25
+# to compose full msg
26
+message = " ".join(args.message)
27
28
+# Call selected cowsay func
29
+getattr(cowsay, args.animal)(message)
implement-cowsay/requirements.txt
@@ -0,0 +1 @@
+cowsay
0 commit comments