diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-20 03:36:25 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-20 03:36:25 (GMT) |
commit | 2ce34914cff387ad0db3e8d3dd4347a79a058640 (patch) | |
tree | 7a9627555ab976b9e11dba3a5bbfa37efe91cefa /test | |
parent | ca08db4867f6437e783b1c9f5734065124a451b0 (diff) | |
download | SCons-2ce34914cff387ad0db3e8d3dd4347a79a058640.zip SCons-2ce34914cff387ad0db3e8d3dd4347a79a058640.tar.gz SCons-2ce34914cff387ad0db3e8d3dd4347a79a058640.tar.bz2 |
py2/3 rb/ab/wb fixes
Diffstat (limited to 'test')
-rw-r--r-- | test/DVIPDF/DVIPDF.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/DVIPDF/DVIPDF.py b/test/DVIPDF/DVIPDF.py index 5c72231..b60107d 100644 --- a/test/DVIPDF/DVIPDF.py +++ b/test/DVIPDF/DVIPDF.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,10 +52,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[:6] != b'#latex': + if l[:6] != '#latex': out_file.write(l) sys.exit(0) """) @@ -65,10 +65,10 @@ import os import sys import getopt cmd_opts, arg = getopt.getopt(sys.argv[1:], 'i:r:', []) -infile = open(arg[0], 'rb') -out_file = open(arg[1], 'wb') +infile = open(arg[0], 'r') +out_file = open(arg[1], 'w') for l in infile.readlines(): - if l[:7] != b'#dvipdf': + if l[:7] != '#dvipdf': out_file.write(l) sys.exit(0) """) @@ -110,7 +110,7 @@ if dvipdf and tex: 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('\\', '\\\\')) |