Optimized code runner and implemented basic IDE feature in app.ed
This commit is contained in:
@@ -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 = ""
|
||||
|
||||
Reference in New Issue
Block a user