itsme at yahoo.com
Wed Jan 5 15:29:47 EST 2005
Thanks for the reply. I will chew on this a bit.
"Kartic" <kartic.krishnamurthy at gmail.com> wrote in message
news:1104955511.276842.316210 at f14g2000cwb.googlegroups.com...
> 1. Put your COM invokations in a try/except loop. From my experience,
> that helped me prevent, in most cases, Excel from "hanging" and having
> to restart the PC too. In the except part, release the Excel (or other
> COM resource) (e.g.calling workbook.Close() or excelobj.Quit(),
> depending on the state of your program)
> 2. Look at
> to see how to get the actual error.
> 3. Delete instances of the COM connection, RS object or whatever
> win32com.client instances you create. I do this:
> sheetobj = None
> wbkbobj = None
> excelobj = None
> del sheetobj
> del wbkobj
> del excelobj
> 4. At the end of my scripts, I do the following during the development
> ActiveComConn = pythoncom._GetInterfaceCount()
> print 'Done! Active Com Connections :',ActiveComConn # Print count of
> Active COM connections.
> Thank you,
More information about the Python-list