summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--esds/__main__.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/esds/__main__.py b/esds/__main__.py
index dbc333a..8797f2d 100644
--- a/esds/__main__.py
+++ b/esds/__main__.py
@@ -1,14 +1,23 @@
import sys, argparse
-def run(args):
- print(args)
+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="*")
+ 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()