Skip to content
Snippets Groups Projects
Commit e24b1f1a authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

Changes for setting default to mvstream, blizzard directories

* Moved mvstream settings to default configuration
* Adapted examples accordingly and updated README and docs
* Changed blizzard setup to use /scratch for working, read account from .acct
parent 016eabba
No related branches found
No related tags found
No related merge requests found
......@@ -186,6 +186,15 @@ class ExpConfig(ConfigObj):
))
)
def read_value(value):
if os.path.exists(value):
stream = open(value)
result = stream.read().strip()
stream.close()
else:
result = ''
return result
def split_date(value):
'''Re-format datetime string to list for use in namelists'''
match = re.match(r'^0*(\d+)-0*(\d+)-0*(\d+)'
......@@ -235,6 +244,10 @@ class ExpConfig(ConfigObj):
if match:
return split_date(match.group(1))
match = re.match(r'^read\((.*)\)$', value, re.S)
if match:
return read_value(match.group(1))
return value
# Interpolate and evaluate keys if they are an expression
......
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