diff options
Diffstat (limited to 'python/runner')
-rwxr-xr-x | python/runner/interpreter.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/runner/interpreter.py b/python/runner/interpreter.py index 5d8dc09..da60d72 100755 --- a/python/runner/interpreter.py +++ b/python/runner/interpreter.py @@ -71,6 +71,8 @@ class MyConsole(code.InteractiveConsole): prompt = '>>> ' buffer = [] self.write('\n') + except ValueError: + break except EOFError: break @@ -78,10 +80,12 @@ class MyConsole(code.InteractiveConsole): try: exec(code, self.locals) except KeyboardInterrupt: - # Don't show traceback on SIGINT. self.write('^C') raise + except SystemExit as ex: + raise except: + # Show traceback for all other exceptions. self.showtraceback() MyConsole().interact() |