Commit f4fe2b15 authored by Ian Bowman's avatar Ian Bowman
Browse files

Better output of arguments

parent f8e39b69
......@@ -46,13 +46,16 @@ def main():
if print_args:
print("\n")
for arg in p:
if type(p[arg]) == bool and p[arg]:
if p[arg] is None:
print("", end=' ')
elif type(p[arg]) == bool and p[arg]:
#note this only works for action='store_true'
print("--{}".format(arg), end=' ')
elif type(p[arg]) == bool and not p[arg]:
#note this only works for action='store_true'
print("".format(arg), end=' ')
print("", end=' ')
elif type(p[arg]) == str and ' ' in p[arg]:
print('--{}="{}"'.format(arg, p[arg]), end=' ')
......@@ -72,7 +75,7 @@ def main():
shutil.copy2(pickle_path, copy_path)
else:
print("No pickle path {} found for corresponding output {}"\
print("WARNING: No pickle path {} found for {}"\
.format(pickle_path, corresponding_output))
if __name__=='__main__':
......
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