From: Kornel Benko Date: Fri, 7 Apr 2017 16:51:35 +0000 (+0200) Subject: Make runtests.py python3 ready X-Git-Tag: 2.3.0alpha1~104 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=723f0e14d95abd07a6549e0f29374e60579f4b3d;p=features.git Make runtests.py python3 ready Tex2lyx tests with ctest depend on it --- diff --git a/src/tex2lyx/test/runtests.py b/src/tex2lyx/test/runtests.py index c2c7c3050e..f85f70fff1 100755 --- a/src/tex2lyx/test/runtests.py +++ b/src/tex2lyx/test/runtests.py @@ -15,6 +15,8 @@ # suffix, since I don't know how to transport command line arguments through # the autotools "make check" mechanism. +from __future__ import print_function + import os, string, sys, time, difflib, filecmp, subprocess, re def usage(prog_name): @@ -97,13 +99,13 @@ def main(argv): else: lyxfile = os.path.join(outputdir, base + ".lyx") cmd = '%s -roundtrip -copyfiles -f %s %s' % (tex2lyx, texfile, lyxfile) - print 'Executing: ' + cmd + "\n" + print('Executing: ' + cmd + "\n") proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) proc.wait() err = proc.returncode errorstring = proc.stderr.read() if not errorstring is None: - print errorstring + print(errorstring) if err != 0: errors.append(f) elif not overwrite: