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

Skip to content

Commit 4221d60

Browse files
committed
Chaptor 18
1 parent f048fcc commit 4221d60

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

18_gematria/gematria.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Author : dickdijk <dickdijk@localhost>
4+
Date : 2020-09-15
5+
Purpose: Rock the Casbah
6+
"""
7+
8+
import argparse
9+
10+
11+
# --------------------------------------------------
12+
def get_args():
13+
"""Get command-line arguments"""
14+
15+
parser = argparse.ArgumentParser(
16+
description='Gematria',
17+
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
18+
19+
parser.add_argument('text',
20+
metavar='text',
21+
help='Input text or file')
22+
23+
24+
return parser.parse_args()
25+
26+
27+
# --------------------------------------------------
28+
def main():
29+
"""Make a jazz noise here"""
30+
31+
args = get_args()
32+
text = args.text
33+
34+
print(f'str_arg = "{text}"')
35+
36+
37+
# --------------------------------------------------
38+
if __name__ == '__main__':
39+
main()

0 commit comments

Comments
 (0)