Commit 6bc3b1a6 authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

add write_config function

parent 46276a26
...@@ -1253,6 +1253,14 @@ def read_config(path): ...@@ -1253,6 +1253,14 @@ def read_config(path):
return config return config
def write_config(config, path):
basepath = config.get_basepath()
dirname = op.dirname(path) or '.'
config.change_basepath(dirname)
guts.dump(config, filename=path)
config.change_basepath(basepath)
def analyse(problem, niter=1000, show_progress=False): def analyse(problem, niter=1000, show_progress=False):
if niter == 0: if niter == 0:
return return
...@@ -2273,6 +2281,7 @@ __all__ = ''' ...@@ -2273,6 +2281,7 @@ __all__ = '''
TargetAnalysisResult TargetAnalysisResult
load_problem_info_and_data load_problem_info_and_data
read_config read_config
write_config
forward forward
harvest harvest
go go
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment