Skip to content
Snippets Groups Projects
Commit ed97e751 authored by Christoph.Knote's avatar Christoph.Knote
Browse files

A number of updates!

parent 0c9dd2fe
No related branches found
No related tags found
No related merge requests found
......@@ -31,10 +31,14 @@ class ExampleData:
else:
raise Exception("Input file {:s} does not exist.".format(name))
def __init__(self, path):
self.path = path
self.path = path
self.files = { x.replace(".csv", ""): os.path.join(self.path, x) for x in os.listdir(self.path) if '.csv' in x }
examples = { x: ExampleData(os.path.join(examplesPath, x)) for x in os.listdir(examplesPath) if os.path.isdir( os.path.join(examplesPath, x) ) }
self.mech = 'unknown'
try:
with open( os.path.join( self.path, 'mech_used' ) ) as f:
self.mech = f.readline()
except:
pass
compiledMechsPath=os.path.join(os.environ['KPP_HOME'], "boxmox", "compiled_mechs")
......@@ -44,6 +48,9 @@ try:
except:
print("No compile_mechs directory found")
_examples = { x: ExampleData(os.path.join(examplesPath, x)) for x in os.listdir(examplesPath) if os.path.isdir( os.path.join(examplesPath, x) ) }
examples = { x: _examples[x] for x in _examples if _examples[x].mech in compiledMechs }
class Namelist:
'''
A BOXMOX (Fortran 90) namelist. Getting and setting of values
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment