A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/064865.html below:

win32com_garbage collection, another QTN

win32com_garbage collection, another QTNzzzzz zzizz_ at notmail.com
Wed Apr 25 22:46:00 EDT 2001
On Mon, 23 Apr 2001 02:12:56 GMT, Mark Hammond <MarkH at ActiveState.com>
wrote:

>zzzzz wrote:
>...
>
>> My problem is excel, and getting it to close properly:
>> 

>> 
>> state=win32com.client.Dispatch("Excel.application")
The following command returns a Workbooks object that I don't assign
to anything:
>> state.Workbooks.Open("G:\\MH_State_Flow_7.xls")
If I do:

wbook=state.Workbooks.Open("G:\\MH_State_Flow_7.xls")

and then:

state,wbook=None,None

then this works & I don't need to call the Quit() command.
>
>  There is a good chance you still have a COM reference left alive. 
>Check what pythoncom._GetInterfaceCount() returns, and if non-zero you 
>have another reference - probably the document or worksheet object.
>
>Mark.

Regards,

zzzzz.
---------------------

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4