Commit 3a4488cd authored by Jonathan Jenkins's avatar Jonathan Jenkins

more stable file format for configurator output

00001,00002,...,00010 rather than 1,2,...,10 for IDs (correct lexicographic
ordering)
parent 76e3f082
......@@ -47,7 +47,7 @@ def main():
for i,_ in enumerate(cfg):
new_config = conf.replace_many(tstr, cfg.replace_map)
fname = template+"."+str(i) if args.output_prefix==None else \
args.output_prefix+"."+str(i)
args.output_prefix +"." + "{:05d}".format(i)
with open(fname, "w") as fout:
fout.write(new_config)
......
......@@ -60,7 +60,7 @@ def main():
if k not in cfg.replace_map or tdict[k] != cfg.replace_map[k]:
break
else:
stdout.write(args.output_prefix + str(i) + "\n")
stdout.write(args.output_prefix + "{:05d}".format(i) + "\n")
def parse_args():
parser = argparse.ArgumentParser(\
......
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