There is report_callback_exception
to do this:
import traceback
import tkMessageBox
# You would normally put that on the App class
def show_error(self, *args):
err = traceback.format_exception(*args)
tkMessageBox.showerror('Exception',err)
# but this works too
tk.Tk.report_callback_exception = show_error
If you didn’t import Tkinter as tk
, then do
Tkinter.Tk.report_callback_exception = show_error