Terminating a local process COM server
sholden at holdenweb.com
Fri Jun 29 07:32:34 EDT 2001
"Duncan Booth" <duncan at NOSPAMrcp.co.uk> wrote in ...
> "Steve Holden" <sholden at holdenweb.com> wrote :
> > For efficiency reasons I am implementing a credit-card checking
> > algorithm as a COM LocalServer object.
> > For debugging purposes I would like to be able to terminate the current
> > instantiation (i.e. process), so I can start another one with revised
> > Python code. It would also be nice, in production, to have some way to
> > terminate the LocalServer process so that the next instantiation of the
> > COM object restarts the server in a new process.
> > I'm aware that this would invalidate references to any objects created
> > by the process, but for testing it *would* be "comvenient" not to have
> > to kill the COM server process manually.
> > Anyone help? Or at least explain where I'm mistaken if this isn't a
> > sensible goal...
[ ... ]
> Another option would be to put the COM object into an NT service. That way
> you can simply stop and start the service at will. I recently wrote a
> service containing a COM object, let me know if you want a copy of the
> code. The downside to this is that it makes it harder to debug the service
> when things go wrong.
Hadn't thought of that. Yes, please mail me a copy of your code. As we both
know, things never go wrong when you program in Python ;^)
More information about the Python-list