这段代码
import tkinter
import windnd
def dragged_files(files):
msg = '\n'.join((item.decode('gbk') for item in files))
print(msg)
tk = tkinter.Tk()
windnd.hook_dropfiles(tk,func=dragged_files)
tk.mainloop()
不知道为什么会突然提示AttributeError:module 'windnd' has no attribute 'hook_dropfiles'
我昨天运行时是好的。今天开机再运行就突然提示这个。
自己已经弄明白了。文件名的问题。