#!python # -*- mode: python; Encoding: utf-8; coding: utf-8 -*- # Last updated: <2021/12/10 20:51:57 +0900> """ windnd sample Windows10 x64 21H1 + Python 3.9.9 64bit + windnd 1.0.7 """ import tkinter as tk import windnd def dragged_files(files): s = ";".join((item.decode("utf-8") for item in files)) text.set(s) print(text.get()) root = tk.Tk() text = tk.StringVar() text.set("Please file drop") entry = tk.Entry(root, textvariable=text, width=80) entry.pack(expand=True, fill=tk.X, padx=16, pady=8) windnd.hook_dropfiles(root, func=dragged_files) root.mainloop()