summaryrefslogtreecommitdiff
path: root/test/DVIPS
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-19 20:34:46 -0700
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-19 20:34:46 -0700
commit008fc596747e0a5255a7ce27ca103d9538944107 (patch)
tree8f60eb3ce4184f59c324c9e0751efba37f5c22fa /test/DVIPS
parent6900f1f74c6356ba4861e2844f81edda5f34243b (diff)
downloadscons-008fc596747e0a5255a7ce27ca103d9538944107.tar.gz
fix ab flag py2/3
Diffstat (limited to 'test/DVIPS')
-rw-r--r--test/DVIPS/DVIPS.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/DVIPS/DVIPS.py b/test/DVIPS/DVIPS.py
index 17746950..01f00780 100644
--- a/test/DVIPS/DVIPS.py
+++ b/test/DVIPS/DVIPS.py
@@ -55,7 +55,7 @@ base_name = os.path.splitext(arg[0])[0]
infile = open(arg[0], 'r')
out_file = open(base_name+'.dvi', 'w')
for l in infile.readlines():
- if l[:6] != b'#latex':
+ if l[:6] != '#latex':
out_file.write(l)
sys.exit(0)
""")
@@ -122,10 +122,11 @@ dvips = test.where_is('dvips')
if dvips:
- test.write("wrapper.py", """import os
+ test.write("wrapper.py", """
+import os
import sys
cmd = " ".join(sys.argv[1:])
-open('%s', 'ab').write("%%s\\n" %% cmd)
+open('%s', 'a').write("%%s\\n" %% cmd)
os.system(cmd)
""" % test.workpath('wrapper.out').replace('\\', '\\\\'))