diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-20 03:34:46 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-20 03:34:46 (GMT) |
commit | ca08db4867f6437e783b1c9f5734065124a451b0 (patch) | |
tree | 8f60eb3ce4184f59c324c9e0751efba37f5c22fa | |
parent | 997414f66dc5fb741246a84f30eb7428374eee1e (diff) | |
download | SCons-ca08db4867f6437e783b1c9f5734065124a451b0.zip SCons-ca08db4867f6437e783b1c9f5734065124a451b0.tar.gz SCons-ca08db4867f6437e783b1c9f5734065124a451b0.tar.bz2 |
fix ab flag py2/3
-rw-r--r-- | test/DVIPS/DVIPS.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/DVIPS/DVIPS.py b/test/DVIPS/DVIPS.py index 1774695..01f0078 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('\\', '\\\\')) |