Python COM server problems!?

Lars von Wedel vonWedel at lfpt.rwth-aachen.de
Fri Jan 25 04:11:39 EST 2002


Seems I've got it. Excel (or Windows, rather?) sort of caches the 
current implementation. Restarting Excel does fine..

TNX,
Lars


Steve Holden wrote:

> "Alex Martelli" <aleax at aleax.it> wrote ...
> 
>>"Lars von Wedel" <vonWedel at lfpt.rwth-aachen.de> wrote...
>>
>>>Okay, folks, seems I've tracked the problem down:
>>>When I change my sources, how do put these changes into effect?
>>>It works when I create a new Guid and put a different
>>>prog_id into the class, but thats's somewhat tedious, isn't it?
>>>
>>>Are there better ways to re-register a Python COM server?
>>>
>>What about unregistering, then registering it again?
>>
>>
> Specifically, use the following code:
> 
> if __name__ == "__main__":
>         import win32com.server.register
>         win32com.server.register.UseCommandLine(COMObjectClass)
> 
> Then, if you run your Python program with no arguments it will register your
> COM object, if you run it with --deregister or --debug arguments it will do
> what you would expect.
> 
> regards
>  Steve
> --
> Consulting, training, speaking: http://www.holdenweb.com/
> Python Web Programming: http://pydish.holdenweb.com/pwp/
> 
> 
> 
> 
> 
> 





More information about the Python-list mailing list