Index: Lib/_dummy_thread.py =================================================================== --- Lib/_dummy_thread.py (revision 66320) +++ Lib/_dummy_thread.py (working copy) @@ -16,7 +16,15 @@ __all__ = ['error', 'start_new_thread', 'exit', 'get_ident', 'allocate_lock', 'interrupt_main', 'LockType'] -import traceback as _traceback +def _print_exc(limit=None, file=None, chain=True): # copied from "traceback" + """Shorthand for 'print_exception(*sys.exc_info(), limit, file)'.""" + if file is None: + file = sys.stderr + try: + etype, value, tb = sys.exc_info() + print_exception(etype, value, tb, limit, file, chain) + finally: + etype = value = tb = None class error(Exception): """Dummy implementation of _thread.error.""" @@ -48,7 +56,7 @@ except SystemExit: pass except: - _traceback.print_exc() + _print_exc() _main = True global _interrupt if _interrupt: