Pythoncom shutdown problems

Mark Hammond mhammond at skippinet.com.au
Mon Jul 28 01:19:21 EDT 2003


Hannes Grund wrote:
> Dear all,
> probably offtopic for the general python list, but I don't know were to go
> else.
> 
> I'm currently developing somekind of middleware
> wich makes heavy use of pythonwin/com extensions.
> (The complete setup is: win2000/winXP, python2.2,
> win32all-152, wxPython resp. wxWindows).
> 
> The software is aimed to manage data held by a software
> suite (called chemoffice) to manage chemical substances.
> It exposes it main components via COM, the intagration
> to python via win32com.client.Dispatch works well.
> The problem:
> 
> When calling a special method on some of these COM objects
> one component launches a process which appears to be a subprocess
> of svchost.exe.
> The result is that I'm unable to terminate the python process
> after this process has been started, furthermore if
> I shutdown the python process manually, it keeps alive, causing
> problems during windows shutdown (i.e. you have to remove
> it manually as well).
> 
> Any help or hint would be highly appreciated,

I'm not sure what you mean by "can not terminate" the process means in 
this context, especially given you can shut it down manually.  I assume 
Python is not implemented any COM objects, only using them?

But it does sound like a COM object reference problem.  Using 
pythoncom._GetInterfaceCount/GetGatewayCount may help you in tracking 
this down.

Mark.





More information about the Python-list mailing list