Skip to content

Instantly share code, notes, and snippets.

@vincentscode
Created July 16, 2019 12:42
Show Gist options
  • Save vincentscode/84a9f0e7b66d4f8c056606ac6dc74292 to your computer and use it in GitHub Desktop.
Save vincentscode/84a9f0e7b66d4f8c056606ac6dc74292 to your computer and use it in GitHub Desktop.
def debug_shell():
print("[DEBUG SHELL]", "Waiting for input")
while True:
command = input(">>> ")
if command == "exit()":
break
try:
exec(command)
except Exception as e:
print("[DEBUG SHELL]", e)
print("[DEBUG SHELL]", "Finished session")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment