blob: 8797f2dc746ab9a11ab4020be5db168c03fde64b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import sys, argparse
def run(arguments):
parser = argparse.ArgumentParser(description='Run a simulation')
parser.add_argument("platform", help="Run a simulation using a specific platform file")
args = parser.parse_args(arguments[1:])
if args.platform:
print("Run simulation using "+args.platform)
else:
parser.print_help()
def main():
##### Parse arguments
parser = argparse.ArgumentParser(
description='ESDS Simulator CLI toolbox. Allow you to run simulations and perform various tasks.')
parser.add_argument("run", help="Run a simulation", nargs=argparse.REMAINDER)
args = parser.parse_args()
##### Run commands
if args.run:
run(args.run)
else:
parser.print_help()
|