mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 20:03:33 +01:00
Fixed bug with subst
This commit is contained in:
parent
8b773a9d45
commit
5fda8abb51
Binary file not shown.
@ -272,7 +272,7 @@ def print_options():
|
||||
import subprocess
|
||||
for k in keys:
|
||||
description = options[k][1]
|
||||
p1 = subprocess.Popen(["fold", "-s", "-w", "40"],stdout=subprocess.PIPE,stdin=subprocess.PIPE)
|
||||
p1 = subprocess.Popen(["fold", "-s", "-w", "40"],stdout=subprocess.PIPE,stdin=subprocess.PIPE, encoding='utf8')
|
||||
description = p1.communicate(description)[0]
|
||||
description = description.replace('\n','\n'.ljust(27))
|
||||
print(("-%s, --%s"%(k,options[k][0])).ljust(25), description+'\n')
|
||||
|
@ -311,7 +311,7 @@ def execute_templates(text):
|
||||
script += "for d in v:\n t0 = str(template)\n"
|
||||
for v in variables:
|
||||
script += " t0 = t0.replace('%s',d['%s'])\n"%(v,v)
|
||||
script += " print t0\n"
|
||||
script += " print(t0)\n"
|
||||
# Write script file
|
||||
scriptname = "%s%s_template_%d"%(irpdir,line.filename,line.i)
|
||||
file = open(scriptname,'w')
|
||||
|
Loading…
Reference in New Issue
Block a user