Optimized code runner and implemented basic IDE feature in app.ed

This commit is contained in:
Luxferre
2025-12-26 16:12:08 +02:00
parent e66ebd50a9
commit c6f567b0ba
4 changed files with 53 additions and 7 deletions
+5 -7
View File
@@ -5,10 +5,8 @@ try:
from repl.keys import show_keys
except:
pass
try:
from codeop import compile_command
except:
pass
from deck.runtime import runcode
if 'tdeckboot.py' in os.listdir('/'):
from tdeckboot import *
@@ -27,9 +25,9 @@ while True:
if __line.lower() == 'exit': break
__cmd = __line
try:
if compile_command(__cmd):
exec(compile_command(__cmd))
status, res = runcode(__cmd)
if status != 1:
__cmd = ""
except Exception as __err:
print("*ERROR* Exception:",str(__err))
print("*ERROR* Exception:", str(__err))
__cmd = ""