python拖放文件,拖拽文件,返回路径

import tkinter
from tkinter.messagebox import showinfo
import windnd

def dragg(files):
msg = ‘\n’.join((item.decode(‘gbk’) for item in files))
# showinfo(‘拖入的文件是:’,msg)
print(msg)

tk =tkinter.Tk()
windnd.hook_dropfiles(tk,func=dragg)
tk.mainloop()

你可能感兴趣的:(python,开发语言,后端)