On 31 Oct 2022 09:59, Jon Turney wrote: i guess the feedback below isn't exactly about new code even if it's relevant ... > + # fail if there are unhandled texinfo commands > + match = re.search('(? + if match: > + print("texinfo command '%s' remains in output" % match.group(), file=sys.stderr) this is a little dangerous in general as match.group() could return a tuple, and this would fail. if you want to use %, you should force a tuple. print("..." % (match.group(),), ...) > + exit(1) scripts should never use exit(), only sys.exit(). although i see the current script gets this wrong in a lot of places. also you can simplify this -- sys.exit accepts a string that it'll print to stderr and then exit non-zero. sys.exit(".....") -mike