Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions doc/include_anchors.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ def process(dir, root, suffix):
del anchors[anchor]
else:
for anchor in anchors:
os.write(anchors[anchor].fileno(), line)
anchors[anchor].write(line)
INPUT.close()
for anchor in anchors:
if anchor != '':
print "ERROR: anchor '%s' did not terminate" % anchor
print("ERROR: anchor '%s' did not terminate" % anchor)
anchors[anchor].close()
#
processed.add(bname)


for file in sys.argv[1:]:
print "Processing file '%s' ..." % file
print("Processing file '%s' ..." % file)
INPUT = open(file, 'r')
for line in INPUT:
suffix = None
Expand All @@ -82,8 +82,8 @@ def process(dir, root, suffix):
#print "HERE", line, suffix
fname = m.group(1)+m.group(2)+'.'+suffix
if not os.path.exists(fname):
print line
print "ERROR: file '%s' does not exist!" % fname
print(line)
print("ERROR: file '%s' does not exist!" % fname)
sys.exit(1)
process(m.group(1), m.group(2), suffix)
INPUT.close()
Expand Down