[python-win32] COM: change in Python object does not get registered
Beat Niederhauser
beat.niederhauser at gmx.ch
Sun Mar 4 23:59:13 CET 2007
Mark Hammond escreveu:
>
> You need to either restart excel, or arrange for your module to be
> 'reload'ed. One way would be to add a 'reload' method to your object. For
> example, the .py code might have:
>
> def reload(self):
> import mymod
> reload(mymod)
>
> And your VB code could then look like:
>
> ob.reload() ; reload the module using the 'old' object
> set ob = CreateObject("Your.ProgID") ; re-create ob with the new code
>
> and from then on, 'ob' should have any changes you have made.
>
> Mark
>
>
Thanks. Everything works fine now.
Beat
More information about the Python-win32
mailing list