Python Filemanager and Shell Context Menu

John J. Lee jjl at pobox.com
Tue Apr 6 18:29:19 EDT 2004


Francesco <scrutinizer at gmx.at> writes:

> Hello Pythonnian's
> 
> (sorry for crossposting)
> 
> I have written on the base of Miro Rajic a (still) small filemanager
> in wxPython.
> Now I want to add (for Windows XP) a explorer shell context menu.
> 
> I have no idea, how to accomplish this.
> For what I can imagine:
> Either use ctypes and the kernel or shell dll, or win32 extensions.
> 
> Have someone done such a task before?
> Can someone help me?
[...]

There's a good O'Reilly book about this, which certainly covers what
you want:

"Visual Basic Shell Programming", J.P. Hamilton


I used that book to write a trivial IE plugin that I posted to the
ctypes mailing list -- not directly relevant, but may set you on the
right track (it shows how to implement COM interfaces that aren't
defined in any type library).

Generally, for all this Windows shell programming, you implement some
COM interfaces, and then set up set up some registry keys to tell
Windows what you've done.  The book tells you which interfaces and
which keys you need, documents some bugs and oddities and gives some
example code.  You just have to translate the VB code to Python+ctypes
(which is not necessarily an entirely hitch-free process ;-).
Obviously, there's no Python-specific info in the book.


John



More information about the Python-list mailing list