[Tutor] setting object to None doesn't kill Word
Mallett, Roger
rmallett@rational.com
Wed, 3 Jan 2001 17:02:48 -0800
System: Windows 2000, Office 2000
I am on page 67-68 of Mark Hammond's book "Python Programming on Win32" and
I can't seem to kill Word by setting the object to None.
I did the following:
>>> import win32com.client
>>> x1 = win32.com.client.Dispatch('Excel.Application')
At this point an instance of Excel has been created and I see it listed in
the Task Manager. Next I will kill the Excel object
>>>x1 = None
The Excel instance has been terminated. I can now longer see it listed in
Task Manager
Now, if I try the same with Word
>>> x1=win32.com.client.Dispatch('Word.Application')
I can see Word in the Task Manager. However, if I try to kill it, it
doesn't go away.
>>> x1=None # this doesn't work. Why Not?
I am wondering if this is a Win2K specific issue and if there is another way
to kill the task besides changing the python object.
Any assistance in understanding this is greatly appreciated.
Thank you,
Roger Mallett