From: Carl Hetherington Date: Sat, 24 Sep 2022 20:48:33 +0000 (+0200) Subject: Python 3 compatibility for pptext.py X-Git-Tag: v2.16.28~7 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=5268bf59c16f9259016e5f4d3234b55b2a53d0b1 Python 3 compatibility for pptext.py --- diff --git a/doc/manual/pptex.py b/doc/manual/pptex.py index 85653e5a5..91425a060 100755 --- a/doc/manual/pptex.py +++ b/doc/manual/pptex.py @@ -14,15 +14,15 @@ import tempfile import shutil f = open(sys.argv[1]) -t = tempfile.NamedTemporaryFile(delete = False) +t = tempfile.NamedTemporaryFile(delete=False) remove_next = False -while 1: +while True: l = f.readline() if l == '': break if not remove_next: - print>>t,l, + t.write(l.encode('UTF-8')) remove_next = False