弄了一个 windown10 后台循环读文件程序。程序运行后最小化到桌面右下角。在右下角图标上面有 3 个功能菜单,一个显示“配置参数”界面,一个显示“运行列表”界面,一个退出按钮
“配置参数”界面可以正常显示关闭。
“运行列表”界面关闭后,点击桌面右下角退出按钮后,程序退出隔一会儿会报错,报错内容如下:
Exception ignored in: >
Traceback (most recent call last):
File "C:\Users\85447\AppData\Local\Programs\Python\Python36-32\lib\tkinter\__init__.py", line 329, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Tcl_AsyncDelete: async handler deleted by the wrong thread
此段代码可能是产生报错原因
instrserial_button = Entry(self, textvariable=self.dec_name_dict[dish], width=15,
bg='white',state='readonly')#.grid(row=j, column=3)
使用 sysTrayIcon 做的桌面右下角图标,主要代码摘抄这里
def showRegSet_sys(sysTrayIcon):
try:
title &