Commit a25b91cb authored by kulvait's avatar kulvait

Manipulation with params file to read items

parent 366e57ad
...@@ -16,3 +16,16 @@ def readParamsFile(f, params = None): ...@@ -16,3 +16,16 @@ def readParamsFile(f, params = None):
except IOError: except IOError:
print("Could not read params file %s"%f) print("Could not read params file %s"%f)
return(params) return(params)
def writeParamsFile(params, f):
with open(f, "w") as p:
p.write("#!/bin/bash")
p.write("\n")
kx = params.keys()
kx.sort()
for k in kx:
p.write("%s=%s"%(str(k), str(params[k])))
p.write("\n")
p.close()
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