diff --git a/bin/sixtypical b/bin/sixtypical index 2296ac3..ad94be2 100755 --- a/bin/sixtypical +++ b/bin/sixtypical @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from os.path import realpath, dirname, join import sys diff --git a/tests/appliances/bin/dcc6502-adapter b/tests/appliances/bin/dcc6502-adapter index 85b6f17..4aff644 100755 --- a/tests/appliances/bin/dcc6502-adapter +++ b/tests/appliances/bin/dcc6502-adapter @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # script that allows the binary output of sixtypical --output-format=c64-basic-prg --compile to be # disassembled by https://github.com/tcarmelveilleux/dcc6502 @@ -8,7 +8,7 @@ import re from subprocess import check_output from tempfile import NamedTemporaryFile -bytes = sys.stdin.read() +bytes = sys.stdin.buffer.read() bytes = bytes[14:] @@ -17,6 +17,8 @@ filename = f.name f.write(bytes) f.close() -lines = [line for line in check_output("dcc6502 -o 2061 {}".format(filename), shell=True).split('\n') if line and not line.startswith(';')] +output = check_output("dcc6502 -o 2061 {}".format(filename), shell=True) +output_lines = output.decode('utf-8').split('\n') +lines = [line for line in output_lines if line and not line.startswith(';')] lines = [re.sub(r'\s*\;.*$', '', line) for line in lines] sys.stdout.write('\n'.join(lines))