Python COM server problems!?
Steve Holden
sholden at holdenweb.com
Wed Jan 23 11:44:03 EST 2002
"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