tkinterdnd2
TkinterDnD2 is a python wrapper for George Petasis'' tkDnD Tk extension version 2
Decision gist · record as of 2026-08-14
Yes, if you need native drag-and-drop in a Tkinter application and are willing to work with a Pre-Alpha package. The low install friction, permissive license, active maintenance, and zero known vulnerabilities make it a reasonable choice. The main caveat is the Pre-Alpha status—test thoroughly in your target environments before shipping, and verify that the bundled tkDnD binaries work on all platforms you support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later; tkDnD binaries are bundled but platform-specific behavior depends on native Tk/Tcl support on your OS.
- Low install friction; pure Python wheel with no compiled dependencies to build.
- Actively maintained as of 2026-07-05 with recent release history.
License · maintenance · safety
permissive license (permissive) — MIT license permits commercial and private use with minimal restrictions; permissive treatment means you can use this in proprietary projects.
last release 2026-07-05 (40 days) · last repo commit 2026-07-05 · 59 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 273,913 downloads/mo, #8,195 on PyPI
Alternatives
Verify before relying
pip install tkinterdnd2
import tkinter as tk
from tkinterdnd2 import DND_FILES, TkinterDnD
root = TkinterDnD.Tk()
lb = tk.Listbox(root)
lb.drop_target_register(DND_FILES)
lb.dnd_bind('<>', lambda e: lb.insert(tk.END, root.tk.splitlist(e.data)[0]))
lb.pack()
root.mainloop()- Whether tkDnD binaries are included for all three platforms (Windows, macOS, Unix) or if some require separate installation.
- Compatibility with Python 3.12+ given the Pre-Alpha development status and Tcl 9 support claim.
- Performance characteristics when handling large file drops or rapid drag-drop sequences.
What it is and what it does
tkinterdnd2 is a Python wrapper around the tkDnD Tk extension that enables native drag-and-drop functionality in Tkinter applications. It allows you to register widgets as drop targets and bind handlers to receive dropped files or data, with support for Windows, macOS, and Unix. The package bundles precompiled tkDnD binaries and handles the low-level Tcl/Tk integration so you can use drag-and-drop in standard Tkinter code or integrate it into frameworks like PySimpleGUI and CustomTkinter that manage their own Tk root windows.
The core workflow is straightforward: create a TkinterDnD.Tk() root (or call TkinterDnD.require() on an existing root), register widgets as drop targets using drop_target_register(), and bind a handler with dnd_bind() to process the dropped data. The package handles the quirk that dropped file paths arrive as a Tcl list string (with braces around paths containing spaces) rather than a Python list, providing a splitlist() utility to parse them correctly.
Use it for
- Build a file picker UI where users drag files onto a listbox or input field instead of using a file dialog.
- Create a batch file processor that accepts dropped files and queues them for processing.
- Integrate drag-and-drop into a PySimpleGUI or CustomTkinter application without replacing the framework's root window.
- Add native drag-and-drop to a cross-platform desktop tool that must work on Windows, macOS, and Linux.
- Enable drag-and-drop in a Tkinter-based data entry form to accept dropped documents or images.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need native drag-and-drop in a Tkinter application and are willing to work with a Pre-Alpha package.
The low install friction, permissive license, active maintenance, and zero known vulnerabilities make it a reasonable choice. The main caveat is the Pre-Alpha status—test thoroughly in your target environments before shipping, and verify that the bundled tkDnD binaries work on all platforms you support.
Install
tkinterdnd2 on PyPI
Before you install
Low install friction; pure Python wheel with no compiled dependencies to build. Actively maintained as of 2026-07-05 with recent release history.
Requires Python 3.6 or later; tkDnD binaries are bundled but platform-specific behavior depends on native Tk/Tcl support on your OS.
License in practice
MIT license permits commercial and private use with minimal restrictions; permissive treatment means you can use this in proprietary projects.
Quickstart
pip install tkinterdnd2
import tkinter as tk
from tkinterdnd2 import DND_FILES, TkinterDnD
root = TkinterDnD.Tk()
lb = tk.Listbox(root)
lb.drop_target_register(DND_FILES)
lb.dnd_bind('<>', lambda e: lb.insert(tk.END, root.tk.splitlist(e.data)[0]))
lb.pack()
root.mainloop()
Verify before relying
- Whether tkDnD binaries are included for all three platforms (Windows, macOS, Unix) or if some require separate installation.
- Compatibility with Python 3.12+ given the Pre-Alpha development status and Tcl 9 support claim.
- Performance characteristics when handling large file drops or rapid drag-drop sequences.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 40 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 273,913 / month, #8,195 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 2 - Pre-AlphaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 |
Evidence: tkinterdnd2-0.6.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “tkinter drag and drop”
- tkinterdnd2Adds native drag-and-drop support to Tkinter applications on Windows,…
- django-admin-sortable2Adds drag-and-drop reordering of model instances directly in Django…
- django-sortedm2mProvides a drop-in replacement for Django's ManyToManyField that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also customtkinter · pysimplegui · sv-ttk · ttkbootstrap · tkcalendar · django-markdownx · pyinstaller-hooks-contrib · seletools · glfw · easygui