mirror of
https://github.com/catseye/SixtyPical.git
synced 2024-12-18 05:30:11 +00:00
sixtypical
and dcc6502-adapter
run under Python 3 by default.
This commit is contained in:
parent
075ba9ff2a
commit
b38b94ed67
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from os.path import realpath, dirname, join
|
from os.path import realpath, dirname, join
|
||||||
import sys
|
import sys
|
||||||
|
@ -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
|
# script that allows the binary output of sixtypical --output-format=c64-basic-prg --compile to be
|
||||||
# disassembled by https://github.com/tcarmelveilleux/dcc6502
|
# disassembled by https://github.com/tcarmelveilleux/dcc6502
|
||||||
@ -8,7 +8,7 @@ import re
|
|||||||
from subprocess import check_output
|
from subprocess import check_output
|
||||||
from tempfile import NamedTemporaryFile
|
from tempfile import NamedTemporaryFile
|
||||||
|
|
||||||
bytes = sys.stdin.read()
|
bytes = sys.stdin.buffer.read()
|
||||||
|
|
||||||
bytes = bytes[14:]
|
bytes = bytes[14:]
|
||||||
|
|
||||||
@ -17,6 +17,8 @@ filename = f.name
|
|||||||
f.write(bytes)
|
f.write(bytes)
|
||||||
f.close()
|
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]
|
lines = [re.sub(r'\s*\;.*$', '', line) for line in lines]
|
||||||
sys.stdout.write('\n'.join(lines))
|
sys.stdout.write('\n'.join(lines))
|
||||||
|
Loading…
Reference in New Issue
Block a user