summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <loic.guegan@mailbox.org>2023-12-17 16:24:26 +0800
committerLoic Guegan <loic.guegan@mailbox.org>2023-12-17 16:24:26 +0800
commit99531ce638a8c94293c7579249b060054c57db8e (patch)
treee65b72fa8410f8aa4b499a1ea9736d8bc99fb6a4
parent5ca029174910cc7e412533b2e087c056b82a7be1 (diff)
Minor changes
-rw-r--r--esds/__main__.py10
-rw-r--r--esds/debug_analyze.py4
2 files changed, 14 insertions, 0 deletions
diff --git a/esds/__main__.py b/esds/__main__.py
index ccbad20..1c4abc2 100644
--- a/esds/__main__.py
+++ b/esds/__main__.py
@@ -1,5 +1,6 @@
import sys, argparse, os
from .platform import YAMLPlatformFile
+from .debug_analyze import *
from esds import __version__
def run(platform):
@@ -8,6 +9,9 @@ def run(platform):
sys.path.insert(0, simulation.location)
simulation.run()
+def debug(args):
+ debug_infos(args.file)
+
def main():
##### Main parser
parser = argparse.ArgumentParser(
@@ -20,11 +24,17 @@ def main():
run_parser=subparsers.add_parser("run", description='Run a simulation')
run_parser=run_parser.add_argument("platform", help="Platform file")
+ ##### Debug subparser
+ debug_parser=subparsers.add_parser("debug", description='Analyze debug files')
+ debug_parser=debug_parser.add_argument("file", help="Debug file to analyze")
+
##### Execute commands
args = parser.parse_args()
if args.command:
if args.command == "run":
run(args.platform)
+ elif args.command == "debug":
+ debug(args)
elif args.version:
print("ESDS v"+__version__)
else:
diff --git a/esds/debug_analyze.py b/esds/debug_analyze.py
new file mode 100644
index 0000000..0b3f542
--- /dev/null
+++ b/esds/debug_analyze.py
@@ -0,0 +1,4 @@
+
+
+def debug_infos(file):
+ print("infos")