From e8ee5e89e0c301324aaa3b78a7a2e8c8919d53e8 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Tue, 10 Apr 2018 08:03:43 -0500 Subject: removed binary read and write so newlines are crossplatform and updated path for appveyor script --- .appveyor.yml | 2 +- test/YACC/YACC-fixture/myyacc.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a9d2dfc..a735070 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,7 +2,7 @@ image: Visual Studio 2017 shallow_clone: true install: - - "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + - "set PATH=%PYTHON%;%PYTHON%\\Scripts;C:\\cygwin64\\bin;C:\\msys64;%PATH%" - python --version - pip install lxml - pip install pypiwin32 diff --git a/test/YACC/YACC-fixture/myyacc.py b/test/YACC/YACC-fixture/myyacc.py index c2e1abf..756c98f 100644 --- a/test/YACC/YACC-fixture/myyacc.py +++ b/test/YACC/YACC-fixture/myyacc.py @@ -4,10 +4,10 @@ cmd_opts, args = getopt.getopt(sys.argv[1:], 'o:', []) output = None opt_string = '' for opt, arg in cmd_opts: - if opt == '-o': output = open(arg, 'wb') + if opt == '-o': output = open(arg, 'w') else: opt_string = opt_string + ' ' + opt for a in args: - contents = open(a, 'rb').read() - output.write(contents.replace(b'YACC', b'myyacc.py')) + contents = open(a, 'r').read() + output.write(contents.replace('YACC', 'myyacc.py')) output.close() sys.exit(0) -- cgit v0.12