summaryrefslogtreecommitdiff
path: root/test/DVIPS
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-19 20:31:55 -0700
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-19 20:31:55 -0700
commit6900f1f74c6356ba4861e2844f81edda5f34243b (patch)
tree423d87390ed40e624071f340b7e6b2bdab65837e /test/DVIPS
parent9b4dc44ca990b2a645f28c9de9245e7fe2c9e199 (diff)
downloadscons-6900f1f74c6356ba4861e2844f81edda5f34243b.tar.gz
fix ab flag py2/3
Diffstat (limited to 'test/DVIPS')
-rw-r--r--test/DVIPS/DVIPS.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/DVIPS/DVIPS.py b/test/DVIPS/DVIPS.py
index 256258f0..17746950 100644
--- a/test/DVIPS/DVIPS.py
+++ b/test/DVIPS/DVIPS.py
@@ -38,10 +38,10 @@ import sys
import getopt
cmd_opts, arg = getopt.getopt(sys.argv[1:], 'i:r:', [])
base_name = os.path.splitext(arg[0])[0]
-infile = open(arg[0], 'rb')
-out_file = open(base_name+'.dvi', 'wb')
+infile = open(arg[0], 'r')
+out_file = open(base_name+'.dvi', 'w')
for l in infile.readlines():
- if l[:4] != b'#tex':
+ if l[:4] != '#tex':
out_file.write(l)
sys.exit(0)
""")
@@ -52,8 +52,8 @@ import sys
import getopt
cmd_opts, arg = getopt.getopt(sys.argv[1:], 'i:r:', [])
base_name = os.path.splitext(arg[0])[0]
-infile = open(arg[0], 'rb')
-out_file = open(base_name+'.dvi', 'wb')
+infile = open(arg[0], 'r')
+out_file = open(base_name+'.dvi', 'w')
for l in infile.readlines():
if l[:6] != b'#latex':
out_file.write(l)
@@ -63,10 +63,10 @@ sys.exit(0)
test.write('mydvips.py', r"""
import os
import sys
-infile = open(sys.argv[3], 'rb')
-out_file = open(sys.argv[2], 'wb')
+infile = open(sys.argv[3], 'r')
+out_file = open(sys.argv[2], 'w')
for l in infile.readlines():
- if l[:6] != b'#dvips':
+ if l[:6] != '#dvips':
out_file.write(l)
sys.exit(0)
""")