Simple Python IDE
AR199 (78)

This is a simple Python IDE I made using the exec function.

You are viewing a single comment. View All
Dunce (71)

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"))

this can also be useful for debugging.