mnaberez / py65

Emulate 6502-based microcomputer systems in Python
BSD 3-Clause "New" or "Revised" License
234 stars 68 forks source link

assemble command fails on python3 (os x) #77

Closed patricksurry closed 1 year ago

patricksurry commented 1 year ago

py65/utils/console.py isn't decoding bytes to string properly on os x:

        PC  AC XR YR SP NV-BDIZC
65C02: 0000 00 00 00 ff 00110000
.assemble 1000
$1000            Traceback (most recent call last):
  File ".../py65/py65/monitor.py", line 160, in onecmd
    result = cmd.Cmd.onecmd(self, line)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/cmd.py", line 217, in onecmd
    return func(arg)
           ^^^^^^^^^
  File ".../py65/py65/monitor.py", line 341, in do_assemble
    return self._interactive_assemble(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../py65/py65/monitor.py", line 379, in _interactive_assemble
    line = console.line_input(prompt,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../py65/py65/utils/console.py", line 217, in line_input
    line += char
TypeError: can only concatenate str (not "bytes") to str
patricksurry commented 1 year ago

Fixed by #78