Files

36 lines
735 B
Python
Raw Permalink Normal View History

2025-12-22 16:49:57 +02:00
import os
try:
from repl.tdeck_repl import input
from repl.keys import show_keys
except:
pass
from deck.runtime import runcode
2025-12-22 16:49:57 +02:00
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:
status, res = runcode(__cmd)
if status != 1:
2025-12-22 16:49:57 +02:00
__cmd = ""
2025-12-27 18:21:00 +02:00
if status == 0:
print("*ERROR* Exception:", str(res))
2025-12-22 16:49:57 +02:00
except Exception as __err:
print("*ERROR* Exception:", str(__err))
2025-12-22 16:49:57 +02:00
__cmd = ""