Hi! We had a dscussion about what happens when one drops a file on a python sourcecode-file in the python-forum [1]. It turned out, that nothing happens at all. So someone brought up a solution. It is not really a problem with Python but it would be nice to add this to the Windows Installer. The proposed solution was to add the following to the registry (this is the format of the registry editor): Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Python.File\shellex\DropHandler] @="{86C86720-42A0-1069-A2E8-08002B30309D}" [HKEY_CLASSES_ROOT\Python.NoConFile\shellex\DropHandler] @="{86C86720-42A0-1069-A2E8-08002B30309D}" [HKEY_CLASSES_ROOT\Python.CompiledFile\shellex\DropHandler] @="{86C86720-42A0-1069-A2E8-08002B30309D}" That should be simple thing to do using the MSI-Installer. [1] only in german, sorry: http://www.python-forum.de/topic-7493.html
I plan to implement this for 2.6; I think I can make sense out of it. With this setting, dropping file foo.txt on file bar.py will run "python.exe bar.py foo.txt", through different levels of indirection. So the file (path) being dropped appears as sys.argv[1].
I have now added a drop handler in r67149, r67150, and r67151. However, I chose the wsh handler ({60254CA5-953B-11CF-8C96-00AA00B8708C}) instead of the batch file one, as the wsh handler provides long file names, whereas the batch file handler passes 8.3 names.
History
Date
User
Action
Args
2022-04-11 14:56:22
admin
set
github: 44569
2008-11-07 18:57:29
loewis
set
status: open -> closedresolution: fixedmessages: +