-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathexample.py
executable file
·60 lines (40 loc) · 1.37 KB
/
example.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env python
import os
import argparse
from tests.case_1_ import case_1_
from tests.case_2_ import case_2_
from tests.case_3_ import case_3_
from tests.case_4_ import case_4_
from tests.case_5_ import case_5_
from tests.case_6_ import case_6_
from tests.case_7_ import case_7_
def example(IDnumber=0):
#--------------- delegate to the individual example cases...
src_path = os.path.join(
os.path.abspath(
os.path.dirname(__file__)), "files")
dst_path = os.path.join(
os.path.abspath(
os.path.dirname(__file__)), "cache")
if (IDnumber == +1):
case_1_(src_path, dst_path)
elif (IDnumber == +2):
case_2_(src_path, dst_path)
elif (IDnumber == +3):
case_3_(src_path, dst_path)
elif (IDnumber == +4):
case_4_(src_path, dst_path)
elif (IDnumber == +5):
case_5_(src_path, dst_path)
elif (IDnumber == +6):
case_6_(src_path, dst_path)
elif (IDnumber == +7):
case_7_(src_path, dst_path)
return
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument("--IDnumber", dest="IDnumber", type=int,
required=True, help="Run example with ID = (1-7).")
args = parser.parse_args()
example(IDnumber=args.IDnumber)