Python wrapper for running instances of trisurf-ng
Samo Penic
2017-01-20 52e871dbc7bf5b61003718cd3342b5ce5d882c6a
commit | author | age
8ab985 1 from trisurf import trisurf
SP 2 import os
3
4 def combine(Runs,filename="statistics.csv",output="combinedStatistics.csv"):
5     """Runs are those runs of which statistics are to be combined"""
6     data=[]
7     for run in Runs:
8         dir=trisurf.Directory(maindir=run.maindir,simdir=run.subdir)
9         statfile=os.path.join(dir.fullpath(),filename)
10         with open (statfile,"r") as myfile:
11             #lines = [line.rstrip('\n') for line in myfile]
12             data=data+myfile.readlines()[1:]
13
14     with open (output,"w") as output:
15         output.write("Header line placer... Not yet implemented\n")
16         for line in data:
17             output.write(line)
18
19     
20