Attempting to use the assemble command in the monitor will fail in utils/console.py in line_input(), because there is an attempt to concatenate the byte string returned by getch() with the unicode string line (see my comments, below):
def line_input(prompt='', stdin=sys.stdin, stdout=sys.stdout):
stdout.write(prompt)
line = '' # BUG: THIS IS A (UNICODE) STRING
while True:
char = getch(stdin) # BUG: THIS RETURNS A BYTESTRING
code = ord(char)
breakpoint()
if char in ("\n", "\r"):
break
elif code in (0x7f, 0x08): # backspace
if len(line) > 0:
line = line[:-1]
stdout.write("\r%s\r%s%s" %
(' ' * (len(prompt + line) + 5), prompt, line))
elif code == 0x1b: # escape
pass
else:
line += char # BUG: THIS FAILS BECAUSE YOU CAN'T CONCATENATE A UNICODE STRING + BYTE STRING
stdout.write(char)
stdout.flush()
Attempting to use the
assemble
command in the monitor will fail inutils/console.py
inline_input()
, because there is an attempt to concatenate the byte string returned bygetch()
with the unicode stringline
(see my comments, below):