From 5268bf59c16f9259016e5f4d3234b55b2a53d0b1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 24 Sep 2022 22:48:33 +0200 Subject: [PATCH] Python 3 compatibility for pptext.py --- doc/manual/pptex.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.30.2