--- run.py~ 2019-05-18 15:31:57.050496600 -0400 +++ run.py 2019-05-18 15:33:54.470008900 -0400 @@ -474,10 +474,24 @@ exec(code, self.locals) finally: interruptable = False - except SystemExit: + except SystemExit as exc: # Scripts that raise SystemExit should just - # return to the interactive prompt - pass + # return to the interactive prompt, optionally + # after printing the exit message. + args = exc.args + if args in ((), (None,)): + pass + elif len(args) == 1: + arg, = args + if isinstance(arg, int): + if arg == 0: + pass + else: + print("Exited with status", int(arg), file=sys.stderr) + else: + print(arg, file=sys.stderr) + else: + print(args, file=sys.stderr) except: self.usr_exc_info = sys.exc_info() if quitting: