[python-win32] Shell extension debugging
Gertjan Klein
gklein at xs4all.nl
Tue Jun 30 18:49:24 CEST 2009
Tim Roberts wrote:
>It's not that easy. In Python, an object's method functions are just
>another piece of data in the object. When a client instantiates your
>COM object, the Python code creates an instance of your object,
>including pointers to the intermediate language for the method
>functions. That single object will live until the COM object is
>released. Even if you were to use Python magic to reload the module
>source, that would only affect new instances. All of the existing
>instances will continue to point to the original intermediate language
>code snippets.
Yes. However, pywin32 is the one that holds the pointer to the object,
not Windows COM (at least, I assume this is the case). I would have
figured that it is at pywin32's discretion to delete the object and
create a new pointer to a new instance. However, I'll take your word for
it that it doesn't work like that; I don't want to wear you out
answering unimportant questions (especially since I may have some more
important ones later on ;)).
You may be pleased to hear that a first experimental popup submenu (with
a few test items) is now working. Next job is to make it parse a
directory with several settings files, and actually launch a command
prompt with those settings. (I wish I could somehow pass icons to the
submenus, but it seems that for that you need completely owner-drawn
menu items, and that seems like a daunting task!)
Thanks again,
Gertjan.
More information about the python-win32
mailing list