X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=doc%2Fmanual%2Fpptex.py;h=fade5943cbffd0d6fd791e305c8aacd76d086498;hb=bb8ddd298ed2925a94b95651534a563992f840ea;hp=85653e5a545df6a2aa47795106a3aa4737b008d6;hpb=75be8cbd1d3307ea62fe8e79543ca518f4ee7bc2;p=dcpomatic.git diff --git a/doc/manual/pptex.py b/doc/manual/pptex.py index 85653e5a5..fade5943c 100755 --- a/doc/manual/pptex.py +++ b/doc/manual/pptex.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Farcical script to remove newlines after # \begin{sidebar} in dblatex' .tex output; @@ -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