如何在tkinter中更大声地使无声异常发生?

如何在tkinter中更大声地使无声异常发生?,第1张

如何在tkinter中更大声地使无声异常发生?

没有

report_callback_exception
做到这一点

import tracebackimport tkMessageBox# You would normally put that on the App classdef show_error(self, *args):    err = traceback.format_exception(*args)    tkMessageBox.showerror('Exception',err)# but this works tootk.Tk.report_callback_exception = show_error

如果您没有将“ Tkinter as tk”导入,请执行

Tkinter.Tk.report_callback_exception = show_error


欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/zaji/5639667.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-16
下一篇2022-12-16

发表评论

登录后才能评论

评论列表(0条)

    保存