mobicen / varie / popMobility.py @ 9110387b
History | View | Annotate | Download (771 Bytes)
1 | 9110387b | LoreBz | import getopt |
---|---|---|---|
2 | import code # code.interact(local=dict(globals(), **locals())) |
||
3 | from pprint import pprint |
||
4 | import sys |
||
5 | from simulator import Simulator |
||
6 | |||
7 | if __name__ == '__main__': |
||
8 | |||
9 | settingsFile = ''
|
||
10 | sectionExp = ''
|
||
11 | options, remainder = getopt.getopt(sys.argv[1:], '', ['sf=', 'en=']) |
||
12 | mand = set(['--sf', '--en']) |
||
13 | opts = [x[0] for x in options] |
||
14 | # print 'OPTIONS :', opts
|
||
15 | if (not mand.issubset(opts)): |
||
16 | print 'Mandatory args are: --sf (settings file) --en (experiment name)' |
||
17 | sys.exit(1)
|
||
18 | for opt, arg in options: |
||
19 | if opt in ('--sf'): |
||
20 | settingsFile = arg |
||
21 | if opt in ('--en'): |
||
22 | sectionExp = arg |
||
23 | |||
24 | sim = Simulator(settingsFile, sectionExp) |
||
25 | code.interact(local=dict(globals(), **locals())) |