COM/Active X newbie question
Gabe Gittings
ggittings at arraybiopharma.com
Fri Sep 6 18:46:54 EDT 2002
I am a newbie to prgramming in Python and programming under windows. I
am trying to access an .ocx file. I can access the methods in python
after running makePy.py but when I run a test script and try to access
a method from the COM object I get this error.
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\Python22\Lib\site-packages\win32com\gen_py\7ADCDC5B-D0B6-11D1-AA76-002078136998x0x1x0.py",
line 57, in GetRunManagerStatus
return self._oleobj_.InvokeTypes(0xa, LCID, 1, (8, 0), (),)
com_error: (-2147418113, 'Catastrophic failure', None, None)
this is the code I am using
import win32com.client.gencache
import win32com.client
# Use these commands in Python code to auto generate .py support
# makes a .py for the Acquisition .ocx via UUID
from win32com.client import gencache
gencache.EnsureModule('{7ADCDC5B-D0B6-11D1-AA76-002078136998}', 0, 1,
0)
xdk = win32com.client.Dispatch('{7ADCDC5E-D0B6-11D1-AA76-002078136998}')
print xdk.GetSeqQueuePaused()
I am not really sure if .Dispatch is even appropriate in this
situation because I need to monitor an already running application
which I access through it's .ocx. Hope this makes sense.
So in case I wasn't clear there are two questions.
1. why am I getting the error message when I am accessing the COM
objects methods?
2. is this how you connect to a client side COM if you want to access
an already running app.
Thanks
More information about the Python-list
mailing list