Report callback exception on sys.stderr. Applications may want to override this internal function, and should when sys.stderr is None.
(self, exc, val, tb)
| 2605 | exec(open(base_py).read(), dir) |
| 2606 | |
| 2607 | def report_callback_exception(self, exc, val, tb): |
| 2608 | """Report callback exception on sys.stderr. |
| 2609 | |
| 2610 | Applications may want to override this internal function, and |
| 2611 | should when sys.stderr is None.""" |
| 2612 | import traceback |
| 2613 | print("Exception in Tkinter callback", file=sys.stderr) |
| 2614 | sys.last_exc = val |
| 2615 | sys.last_type = exc |
| 2616 | sys.last_value = val |
| 2617 | sys.last_traceback = tb |
| 2618 | traceback.print_exception(exc, val, tb) |
| 2619 | |
| 2620 | def __getattr__(self, attr): |
| 2621 | "Delegate attribute access to the interpreter object" |