tkinterdnd2 0.6.1__tar.gz → 0.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/PKG-INFO +15 -4
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/README.md +14 -3
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/setup.py +1 -1
- tkinterdnd2-0.6.2/tkinterdnd2/tkdnd/linux-arm64/libtkdnd2.10.1.so +0 -0
- tkinterdnd2-0.6.2/tkinterdnd2/tkdnd/linux-arm64-tcl9/libtcl9tkdnd2.10.1.so +0 -0
- tkinterdnd2-0.6.2/tkinterdnd2/tkdnd/linux-x64/libtkdnd2.10.1.so +0 -0
- tkinterdnd2-0.6.2/tkinterdnd2/tkdnd/linux-x64-tcl9/libtcl9tkdnd2.10.1.so +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2.egg-info/PKG-INFO +15 -4
- tkinterdnd2-0.6.1/tkinterdnd2/tkdnd/linux-arm64/libtkdnd2.10.1.so +0 -0
- tkinterdnd2-0.6.1/tkinterdnd2/tkdnd/linux-arm64-tcl9/libtcl9tkdnd2.10.1.so +0 -0
- tkinterdnd2-0.6.1/tkinterdnd2/tkdnd/linux-x64/libtkdnd2.10.1.so +0 -0
- tkinterdnd2-0.6.1/tkinterdnd2/tkdnd/linux-x64-tcl9/libtcl9tkdnd2.10.1.so +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/LICENSE +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/setup.cfg +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tests/test_tkinterdnd2.py +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/TkinterDnD.py +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/__init__.py +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64-tcl9/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64-tcl9/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64-tcl9/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64-tcl9/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64-tcl9/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64-tcl9/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64-tcl9/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-x64-tcl9/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64/libtkdnd2.10.1.dylib +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/libtcl9tkdnd2.10.1.dylib +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-x64/libtkdnd2.9.4.dylib +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-x64/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-x64/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-x64/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-x64/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-x64/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-x64/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-x64/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-x64/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/libtkdnd2.10.1.dll +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/tkdnd2.10.1.lib +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-arm64/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/libtkdnd2.10.1.dll +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/tkdnd2.10.1.lib +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/libtkdnd2.10.1.dll +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/tkdnd2.10.1.lib +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x64-tcl9/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/libtkdnd2.10.1.dll +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/tkdnd2.10.1.lib +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/libtkdnd2.10.1.dll +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/pkgIndex.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/tkdnd.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/tkdnd2.10.1.lib +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/tkdnd_compat.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/tkdnd_generic.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/tkdnd_macosx.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/tkdnd_unix.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/tkdnd_utils.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/win-x86-tcl9/tkdnd_windows.tcl +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2.egg-info/SOURCES.txt +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2.egg-info/dependency_links.txt +0 -0
- {tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tkinterdnd2
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: TkinterDnD2 is a python wrapper for George Petasis'' tkDnD Tk extension version 2
|
|
5
5
|
Home-page: https://github.com/Eliav2/tkinterdnd2
|
|
6
6
|
Author: petasis\pmgagne\eliav2\squiblydoo
|
|
@@ -51,15 +51,22 @@ root = TkinterDnD.Tk() # notice - use this instead of tk.Tk()
|
|
|
51
51
|
lb = tk.Listbox(root)
|
|
52
52
|
lb.insert(1, "drag files to here")
|
|
53
53
|
|
|
54
|
+
def on_drop(event):
|
|
55
|
+
# event.data is a raw Tcl list string, not a Python list - see note below
|
|
56
|
+
for path in root.tk.splitlist(event.data):
|
|
57
|
+
lb.insert(tk.END, path)
|
|
58
|
+
|
|
54
59
|
# register the listbox as a drop target
|
|
55
60
|
lb.drop_target_register(DND_FILES)
|
|
56
|
-
lb.dnd_bind('<<Drop>>',
|
|
61
|
+
lb.dnd_bind('<<Drop>>', on_drop)
|
|
57
62
|
|
|
58
63
|
lb.pack()
|
|
59
64
|
root.mainloop()
|
|
60
65
|
```
|
|
61
66
|

|
|
62
67
|
|
|
68
|
+
> [!NOTE]
|
|
69
|
+
> `event.data` is a raw Tcl list, not a Python list or plain string. When multiple files are dropped, their paths come back space-separated in a single string, and any path containing a space is wrapped in `{braces}` so it can still be told apart from the others. Use `root.tk.splitlist(event.data)` (as above) to get a clean Python list of paths — don't split the string yourself, since that will break on braced/spaced paths.
|
|
63
70
|
|
|
64
71
|
see any of the [demos](./demos) for usage examples.
|
|
65
72
|
|
|
@@ -76,7 +83,9 @@ import PySimpleGUI as sg
|
|
|
76
83
|
from tkinterdnd2 import TkinterDnD, DND_FILES
|
|
77
84
|
|
|
78
85
|
def on_drop(event):
|
|
79
|
-
|
|
86
|
+
# event.data is a raw Tcl list; use splitlist to handle multiple/spaced paths, see note above
|
|
87
|
+
files = window.TKroot.tk.splitlist(event.data)
|
|
88
|
+
window["-FILE-"].update(files[0])
|
|
80
89
|
|
|
81
90
|
layout = [
|
|
82
91
|
[sg.Text("Drag & Drop a File Here")],
|
|
@@ -108,8 +117,10 @@ import customtkinter as ctk
|
|
|
108
117
|
from tkinterdnd2 import TkinterDnD, DND_FILES
|
|
109
118
|
|
|
110
119
|
def on_drop(event):
|
|
120
|
+
# event.data is a raw Tcl list; use splitlist to handle multiple/spaced paths, see note above
|
|
121
|
+
files = app.tk.splitlist(event.data)
|
|
111
122
|
entry.delete(0, "end")
|
|
112
|
-
entry.insert(0,
|
|
123
|
+
entry.insert(0, files[0])
|
|
113
124
|
|
|
114
125
|
app = ctk.CTk()
|
|
115
126
|
app.title("File Drop")
|
|
@@ -30,15 +30,22 @@ root = TkinterDnD.Tk() # notice - use this instead of tk.Tk()
|
|
|
30
30
|
lb = tk.Listbox(root)
|
|
31
31
|
lb.insert(1, "drag files to here")
|
|
32
32
|
|
|
33
|
+
def on_drop(event):
|
|
34
|
+
# event.data is a raw Tcl list string, not a Python list - see note below
|
|
35
|
+
for path in root.tk.splitlist(event.data):
|
|
36
|
+
lb.insert(tk.END, path)
|
|
37
|
+
|
|
33
38
|
# register the listbox as a drop target
|
|
34
39
|
lb.drop_target_register(DND_FILES)
|
|
35
|
-
lb.dnd_bind('<<Drop>>',
|
|
40
|
+
lb.dnd_bind('<<Drop>>', on_drop)
|
|
36
41
|
|
|
37
42
|
lb.pack()
|
|
38
43
|
root.mainloop()
|
|
39
44
|
```
|
|
40
45
|

|
|
41
46
|
|
|
47
|
+
> [!NOTE]
|
|
48
|
+
> `event.data` is a raw Tcl list, not a Python list or plain string. When multiple files are dropped, their paths come back space-separated in a single string, and any path containing a space is wrapped in `{braces}` so it can still be told apart from the others. Use `root.tk.splitlist(event.data)` (as above) to get a clean Python list of paths — don't split the string yourself, since that will break on braced/spaced paths.
|
|
42
49
|
|
|
43
50
|
see any of the [demos](./demos) for usage examples.
|
|
44
51
|
|
|
@@ -55,7 +62,9 @@ import PySimpleGUI as sg
|
|
|
55
62
|
from tkinterdnd2 import TkinterDnD, DND_FILES
|
|
56
63
|
|
|
57
64
|
def on_drop(event):
|
|
58
|
-
|
|
65
|
+
# event.data is a raw Tcl list; use splitlist to handle multiple/spaced paths, see note above
|
|
66
|
+
files = window.TKroot.tk.splitlist(event.data)
|
|
67
|
+
window["-FILE-"].update(files[0])
|
|
59
68
|
|
|
60
69
|
layout = [
|
|
61
70
|
[sg.Text("Drag & Drop a File Here")],
|
|
@@ -87,8 +96,10 @@ import customtkinter as ctk
|
|
|
87
96
|
from tkinterdnd2 import TkinterDnD, DND_FILES
|
|
88
97
|
|
|
89
98
|
def on_drop(event):
|
|
99
|
+
# event.data is a raw Tcl list; use splitlist to handle multiple/spaced paths, see note above
|
|
100
|
+
files = app.tk.splitlist(event.data)
|
|
90
101
|
entry.delete(0, "end")
|
|
91
|
-
entry.insert(0,
|
|
102
|
+
entry.insert(0, files[0])
|
|
92
103
|
|
|
93
104
|
app = ctk.CTk()
|
|
94
105
|
app.title("File Drop")
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="tkinterdnd2",
|
|
8
|
-
version="0.6.
|
|
8
|
+
version="0.6.2",
|
|
9
9
|
author="petasis\\pmgagne\\eliav2\\squiblydoo",
|
|
10
10
|
description="TkinterDnD2 is a python wrapper for George Petasis'' tkDnD Tk extension version 2",
|
|
11
11
|
long_description=long_description,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tkinterdnd2
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: TkinterDnD2 is a python wrapper for George Petasis'' tkDnD Tk extension version 2
|
|
5
5
|
Home-page: https://github.com/Eliav2/tkinterdnd2
|
|
6
6
|
Author: petasis\pmgagne\eliav2\squiblydoo
|
|
@@ -51,15 +51,22 @@ root = TkinterDnD.Tk() # notice - use this instead of tk.Tk()
|
|
|
51
51
|
lb = tk.Listbox(root)
|
|
52
52
|
lb.insert(1, "drag files to here")
|
|
53
53
|
|
|
54
|
+
def on_drop(event):
|
|
55
|
+
# event.data is a raw Tcl list string, not a Python list - see note below
|
|
56
|
+
for path in root.tk.splitlist(event.data):
|
|
57
|
+
lb.insert(tk.END, path)
|
|
58
|
+
|
|
54
59
|
# register the listbox as a drop target
|
|
55
60
|
lb.drop_target_register(DND_FILES)
|
|
56
|
-
lb.dnd_bind('<<Drop>>',
|
|
61
|
+
lb.dnd_bind('<<Drop>>', on_drop)
|
|
57
62
|
|
|
58
63
|
lb.pack()
|
|
59
64
|
root.mainloop()
|
|
60
65
|
```
|
|
61
66
|

|
|
62
67
|
|
|
68
|
+
> [!NOTE]
|
|
69
|
+
> `event.data` is a raw Tcl list, not a Python list or plain string. When multiple files are dropped, their paths come back space-separated in a single string, and any path containing a space is wrapped in `{braces}` so it can still be told apart from the others. Use `root.tk.splitlist(event.data)` (as above) to get a clean Python list of paths — don't split the string yourself, since that will break on braced/spaced paths.
|
|
63
70
|
|
|
64
71
|
see any of the [demos](./demos) for usage examples.
|
|
65
72
|
|
|
@@ -76,7 +83,9 @@ import PySimpleGUI as sg
|
|
|
76
83
|
from tkinterdnd2 import TkinterDnD, DND_FILES
|
|
77
84
|
|
|
78
85
|
def on_drop(event):
|
|
79
|
-
|
|
86
|
+
# event.data is a raw Tcl list; use splitlist to handle multiple/spaced paths, see note above
|
|
87
|
+
files = window.TKroot.tk.splitlist(event.data)
|
|
88
|
+
window["-FILE-"].update(files[0])
|
|
80
89
|
|
|
81
90
|
layout = [
|
|
82
91
|
[sg.Text("Drag & Drop a File Here")],
|
|
@@ -108,8 +117,10 @@ import customtkinter as ctk
|
|
|
108
117
|
from tkinterdnd2 import TkinterDnD, DND_FILES
|
|
109
118
|
|
|
110
119
|
def on_drop(event):
|
|
120
|
+
# event.data is a raw Tcl list; use splitlist to handle multiple/spaced paths, see note above
|
|
121
|
+
files = app.tk.splitlist(event.data)
|
|
111
122
|
entry.delete(0, "end")
|
|
112
|
-
entry.insert(0,
|
|
123
|
+
entry.insert(0, files[0])
|
|
113
124
|
|
|
114
125
|
app = ctk.CTk()
|
|
115
126
|
app.title("File Drop")
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/tkdnd_generic.tcl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/linux-arm64-tcl9/tkdnd_windows.tcl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tkinterdnd2-0.6.1 → tkinterdnd2-0.6.2}/tkinterdnd2/tkdnd/osx-arm64-tcl9/libtcl9tkdnd2.10.1.dylib
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|