Disconnecting from COM server ?
dsavitsk
dsavitsk at e-coli.net
Thu May 2 13:58:24 EDT 2002
>>> x = win32com.client.Dispatch('some.server')
>>> del x
if that crashes, i think the error is on the __del__ end of the server. you
might try
>>> try:
... del x
... except:
... print 'the server crashed.'
-d
"Axel Kowald" <kowald at molgen.mpg.de> wrote in message
news:3CD12F0B.8020408 at molgen.mpg.de...
> Hello,
>
> I'm using Activestates Python (2.1 & 2.2) to connect to a COM server
(win32com.client.Dispatch()). The problem is that python crashes when the
script finally terminates ("The instruction at ... referenced memory at ....
The memory could not be read").
> I guess before exiting I should properly disconnect from the COM server,
but what is the proper way ?
>
> Many thanks,
>
> Axel
>
>
More information about the Python-list
mailing list