win32com_garbage collection, another QTN
Mark Hammond
MarkH at ActiveState.com
Thu Apr 26 09:08:35 EDT 2001
zzzzz wrote:
> 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.
This will be true at an interactive prompt, as the result of the
previous expression is stored in the special '_' variable. Just typing
"1" at the prompt should also kill it (storing 1 in _)
It should not be true if the code is executed in a script...
Mark.
More information about the Python-list
mailing list