From: MHammond at skippinet.com.au (Mark Hammond)
Date: Thu, 20 May 1999 19:41:08 +1000
Subject: COM Shutdown
References: <374370AB.E285C993@prescod.net>
Message-ID: <7i0lac$c51$1@m2.c2.telstra-mm.net.au>
X-UID: 1739                                                

You can find out how many PythonCOM objects are alive at any time by calling
pythoncom._GetInterfaceCount().  If this is zero, shutdown should always be
OK.  If not, you have some immortal objects for some reason...

Alternatively, just try calling pythoncom.CoUninitialize() on the way out.
In builds 124 and before, the hang is almost certainly when PythonCOM is
calling this (but at an inopportune time, causing the hang)

Mark.

Paul Prescod wrote in message <374370AB.E285C993 at prescod.net>...
>I have an app using Automation to talk to Office 2000. It doesn't shut
>down properly. It just hangs when it is done. I'm creating and accessing a
>lot of objects so debugging this will be pretty painful. Does anyone out
>there have any tips?
>
>I can delete everything in the local namespace and it doesn't help:
>
>for key in locals().keys():
>    del locals()[key]
>
>So it doesn't seem to be object deletion but some other shutdown issue.
>Any ideas?







