-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.py
35 lines (28 loc) · 881 Bytes
/
default.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/ccnc_bin/venv/bin/python
import os
import re
import argparse
import textwrap
def main(args):
print args
if __name__ == '__main__':
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description=textwrap.dedent('''\
{codeName} :
========================================
eg) {codeName} --input {in_put} --output {output}
'''.format(codeName=os.path.basename(__file__),
in_put = 'haha',
output = 'hoho')))
parser.add_argument(
'-i', '--input',
help='Input',
default=os.getcwd())
parser.add_argument(
'-o', '--output',
help='Output',
default=os.getcwd())
if not args.extension:
parser.error('No extension given, add -e or --extension')
main(args)