Issue# 586. Thank You, Alex for this report and patch. Much appreciated.
This commit is contained in:
parent
3824b03136
commit
00a027d57d
8
doc/templates/gen.py
vendored
8
doc/templates/gen.py
vendored
@ -7,9 +7,9 @@ date_format = "%d-%b-%Y"
|
||||
# ----------------------------------------------------------------------
|
||||
# functions
|
||||
def usage():
|
||||
print """Usage: gen.py file.in [...]
|
||||
print("""Usage: gen.py file.in [...]
|
||||
Substitute placeholders in input files with content
|
||||
"""
|
||||
""")
|
||||
|
||||
def gen_html(file):
|
||||
"""Replace variables in the file with their content"""
|
||||
@ -49,9 +49,9 @@ for i in range(len(vars)-1, -1, -1):
|
||||
vars.sort()
|
||||
|
||||
# Substitute variables in all input files
|
||||
print "Substituting variables", vars
|
||||
print("Substituting variables {0}".format(vars))
|
||||
for file in input:
|
||||
print "Processing", file, "..."
|
||||
print("Processing {0}...".format(file))
|
||||
text = gen_html(file)
|
||||
file = file.replace(".in", "")
|
||||
open(file, 'w').write(text)
|
||||
|
||||
@ -7,9 +7,9 @@ date_format = "%d-%b-%Y"
|
||||
# ----------------------------------------------------------------------
|
||||
# functions
|
||||
def usage():
|
||||
print """Usage: gen.py file.in [...]
|
||||
print("""Usage: gen.py file.in [...]
|
||||
Substitute placeholders in input files with content
|
||||
"""
|
||||
""")
|
||||
|
||||
def gen_html(file):
|
||||
"""Replace variables in the file with their content"""
|
||||
@ -49,9 +49,9 @@ for i in range(len(vars)-1, -1, -1):
|
||||
vars.sort()
|
||||
|
||||
# Substitute variables in all input files
|
||||
print "Substituting variables", vars
|
||||
print("Substituting variables {0}".format(vars))
|
||||
for file in input:
|
||||
print "Processing", file, "..."
|
||||
print("Processing {0}...".format(file))
|
||||
text = gen_html(file)
|
||||
file = file.replace(".in", "")
|
||||
open(file, 'w').write(text)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user