Python as a drop target (win32) 
Author Message
 Python as a drop target (win32)

Does anyone know how to make a python script or shortcut to one respond properly as a drop target
for files or folders?

I can get around it by calling the Python script from a bat file. Dropping files on the bat file
icon runs the program -  but that's hardly cricket, is it?

Thanks
--
Dale Strickland-Clark
Out-Think Ltd
Business Technology Consultants



Sun, 18 May 2003 08:37:20 GMT  
 Python as a drop target (win32)
I think you have to implement a small COM object called a drop handler. It's
pretty simple really, but there are some weird shell programming/COM
programming hurdles to jump over. In example the fabulous shitem id's :-)

Go to the shell programming section of www.codeproject.com or
buy/steal/borrow D. Esposito's Shell Programming book from wrox, for good
samples /explanation of how to do it.


Quote:
> Does anyone know how to make a Python script or shortcut to one respond

properly as a drop target
Quote:
> for files or folders?

> I can get around it by calling the Python script from a bat file. Dropping

files on the bat file
Quote:
> icon runs the program -  but that's hardly cricket, is it?

> Thanks
> --
> Dale Strickland-Clark
> Out-Think Ltd
> Business Technology Consultants



Mon, 19 May 2003 03:00:00 GMT  
 Python as a drop target (win32)

Quote:

> I think you have to implement a small COM object called a drop handler. It's
> pretty simple really, but there are some weird shell programming/COM
> programming hurdles to jump over. In example the fabulous shitem id's :-)

Or write a little GUI application using win32gui.  However, I'm not sure
that was the original intent - Dale seems to want to drop a file on a
script _shortcut_ and have the drop execute the file with the dropped
file as a param?

If so, then the batch file wrapper already in use would seem fine.

Mark.



Mon, 19 May 2003 03:00:00 GMT  
 Python as a drop target (win32)


Quote:

>> I think you have to implement a small COM object called a drop handler. It's
>> pretty simple really, but there are some weird shell programming/COM
>> programming hurdles to jump over. In example the fabulous shitem id's :-)

>Or write a little GUI application using win32gui.  However, I'm not sure
>that was the original intent - Dale seems to want to drop a file on a
>script _shortcut_ and have the drop execute the file with the dropped
>file as a param?

>If so, then the batch file wrapper already in use would seem fine.

Do you know if anyone has a Python wrapper for the Tk extension TkDND?

It would be great to have DND in Tkinter applications,

Mike.



Tue, 20 May 2003 03:00:00 GMT  
 Python as a drop target (win32)

Quote:


>> I think you have to implement a small COM object called a drop handler. It's
>> pretty simple really, but there are some weird shell programming/COM
>> programming hurdles to jump over. In example the fabulous shitem id's :-)

>Or write a little GUI application using win32gui.  However, I'm not sure
>that was the original intent - Dale seems to want to drop a file on a
>script _shortcut_ and have the drop execute the file with the dropped
>file as a param?

>If so, then the batch file wrapper already in use would seem fine.

>Mark.

I want to be able to kick off a Python program by dropping files on the icon or a shortcut to it.
I'm not bothered about dropping files into a running program (not here, at least).

As I understand it, this is just a registry change but I can't find the specifics in MSDN.

Dropping onto a bat wrapper isn't a tidy solution.
--
Dale Strickland-Clark
Out-Think Ltd
Business Technology Consultants



Wed, 21 May 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Python scripts as Drop targets in Windows Explorer

2. Python programs (or scripts) as drop targets

3. VX-REXX: Getting info. on WPS Drop Target

4. blt_drag&drop target remove ?

5. GCC-2.95 binaries for x86-win32 targets available

6. Drag/Drop of HTML links from IE on Win32 doesn't work

7. Need help for Win32 drag and drop.

8. PAGE - A drag and drop GUI generator now avail for Win32

9. Python 2.1 distutils swig_cpp and binary installation target dir question

10. building python for multiple targets

11. asharedmodule target of Python-1.5/Modules/Makefile missing in 1.5.1

12. Python's bininstall target is wrong in a multi-version environment

 

 
Powered by phpBB® Forum Software