Can't drag and drop onto .py in Windows XP?
Sizer
Sizer at nospam.com
Thu May 8 05:25:02 EDT 2008
"Roger Upole" <rupole at hotmail.com> wrote in
news:mailman.703.1210165759.12834.python-list at python.org:
> Sizer wrote:
>> It's just a little weird that I
>> can't just drag and drop file names onto .pyw or .py files. Am I
>> missing something here?
>>
>> Thanks for any help.
>
> You can register a DropHandler for the Python file class.
> Put this in a .reg file and merge it into the registry:
>
> REGEDIT4
>
> [HKEY_CLASSES_ROOT\Python.File\shellex\DropHandler]
> @="{86C86720-42A0-1069-A2E8-08002B30309D}"
Sir, you rock! I found that it actually worked a little better if I used
a generic wsh drop handler instead of the .exe handler, but I would never
have known where to start looking without your suggestion. I ended up
with the following .reg file, and now I can drag and drop files onto my
.py, .pyw, and .pyc files and off they go as you'd expect. It kind of
seems like this should be the default installer behavior unless there's a
good reason not to do it. Thanks again for your help.
REGEDIT4
[HKEY_CLASSES_ROOT\Python.File\shellex\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"
[HKEY_CLASSES_ROOT\Python.NoConFile\shellex\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"
[HKEY_CLASSES_ROOT\Python.CompiledFile\shellex\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"
More information about the Python-list
mailing list