On Tuesday, 3 April 2018 13.28.55 WEST José Abílio Matos wrote: > Could you test the attached patch?
There was a typo in the last patch... -- José Abílio
diff --git a/lib/scripts/fig_copy.py b/lib/scripts/fig_copy.py index d5e0421668..c6235195c2 100644 --- a/lib/scripts/fig_copy.py +++ b/lib/scripts/fig_copy.py @@ -17,14 +17,15 @@ # picture files that are stored as relative paths are replaced # with the absolute path. +from __future__ import print_function import os, sys if len(sys.argv) != 3: - print >> sys.stderr, "Usage: fig_copy.py <from file> <to file>" + print ("Usage: fig_copy.py <from file> <to file>", file=sys.stderr) sys.exit(1) if not os.path.isfile(sys.argv[1]): - print >> sys.stderr, "Unable to read", sys.argv[1] + print ("Unable to read", sys.argv[1], file=sys.stderr) sys.exit(1) from_dir = os.path.split(os.path.realpath(sys.argv[1]))[0] @@ -68,7 +69,7 @@ for line in input: found = False elif patternline.match(line): found = True - print >> output, line, + print (line, end="", file=output) input.close() output.close()