From f8158551346cd2f26f3ac48ce17bbb764ab747b5 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@fe.uni-lj.si>
Date: Tue, 15 Mar 2016 16:51:26 +0000
Subject: [PATCH] Working on formatiing the status

---
 python/tsmgr |   72 +++++++++++++++++++++++++++++++++--
 1 files changed, 67 insertions(+), 5 deletions(-)

diff --git a/python/tsmgr b/python/tsmgr
index d69312c..52e3fdc 100755
--- a/python/tsmgr
+++ b/python/tsmgr
@@ -1,10 +1,72 @@
 #!/usr/bin/python3
-
+import sys, getopt
 from trisurf import trisurf
 
-
+# -- configuration of the multiple/single run --
 
 run1=trisurf.Runner(snapshot='snapshot.vtu')
-print(run1)
-#print(run1.tape.config)
-print(run1.tape.getValue('nshell'))
+run1.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
+run1.setSubdir("run0")
+
+run2=trisurf.Runner(snapshot='snapshot.vtu')
+run2.setMaindir(("N","k","V","Np","Nm"),("nshell","xk0","constvolswitch","npoly","nmono"))
+run2.setSubdir("run1")
+
+
+#obligatory: combine all runs
+Runs=[run1,run2];
+
+# -- reading command line switches and acting accordingly --
+argv=sys.argv[1:];
+try:
+	opts, args = getopt.getopt(argv,"hrs")
+except getopt.GetoptError:
+	print('tsmgr [-h] [-r] [-s]')
+	sys.exit(2)
+for opt, arg in opts:
+	if opt == '-h':
+		print ('tsmgr [-h] [-r] [-s]')
+		sys.exit()
+	elif opt == '-r':
+		for run in Runs:
+			run.start()
+	elif opt == '-s':
+		for run in Runs:
+			reportstr=run.getStatistics()
+			print(reportstr)
+			#print(run)
+			#print(run.statistics)
+	else:
+		print('tsmgr [-h] [-r] [-s]')
+		sys.exit(2)
+
+
+
+
+
+
+
+
+
+# -- OBSOLETE and TESTING --
+
+
+
+
+
+#	elif opt in ("-i", "--ifile"):
+#		inputfile = arg
+#	elif opt in ("-o", "--ofile"):
+#		outputfile = arg
+#	print ('Input file is "', inputfile)
+#	print ('Output file is "', outputfile)
+
+
+
+#run1.start()
+#run
+#print(run1)
+#run1.getStatistics()
+#print(run1.statistics)
+#print(run1.tape)
+#print(run1.tape.getValue('nshell'))

--
Gitblit v1.9.3