tip:
instead of always raising a syntax error, no matter what the error actually is, like you're doing here:
try:
print(f"{cyan}", end="")
for thng in thing:
if thng in tokens:
print(f"{green}", end="")
exec(thing)
except:
print(colored("Syntax Error.", "red"))
you can get what the actual error is, like so:
try:
print(f"{cyan}", end="")
for thng in thing:
if thng in tokens:
print(f"{green}", end="")
exec(thing)
except Exception as error:
print(colored(error, "red"))
Simple Python IDE
This is a simple Python IDE I made using the
exec
function.tip:
instead of always raising a syntax error, no matter what the error actually is, like you're doing here:
you can get what the actual error is, like so:
this can also be useful for debugging.