import os try: from repl.tdeck_repl import input from repl.keys import show_keys except: pass try: from codeop import compile_command except: pass if 'tdeckboot.py' in os.listdir('/'): from tdeckboot import * if 'autoexec.py' in os.listdir('/'): import autoexec print("T-DeckARD REPL ready") __cmd = "" while True: __line = input(",,, " if __cmd else "=>> " ) if __cmd: __cmd += ("\n" + (" " if __line != "" else "") + __line) else: if __line.lower() == 'exit': break __cmd = __line try: if compile_command(__cmd): exec(compile_command(__cmd)) __cmd = "" except Exception as __err: print("*ERROR* Exception:",str(__err)) __cmd = ""