Hi List,

I am using windows xp, python 2.5.4, with build 213 of pywin32. I am brand new to pywin32, and I have gathered some info from various web searches on how to use the library. I'm clearly doing something wrong.

I am in the process of switching from Matlab to Python, and one thing I need to do is to use an ocx library to control some hardware. Here is how I do it in matlab, which works just fine:

>> h_pa5 = actxcontrol('PA5.x',[1 1 1 1])

h_pa5 =

        COM.PA5_x

>> pa5ret = invoke(h_pa5,'ConnectPA5','USB',1)

pa5ret =

     1

>> invoke(h_pa5, 'SetAtten', 10)

ans =

     1

>>


...With python-win32, I seem to be able to connect to the library, but I can't issue any commands:

>>> import win32com.client
>>> axPA5 = win32com.client.Dispatch("PA5.X")
>>> axPA5
<COMObject PA5.X>
>>> axPA5.ConnectPA5('USB',1)
Traceback (most recent call last):
com_error: (-2147418113, 'Catastrophic failure', None, None)
>>>

What am I doing wrong?

--
Christopher Brown, Ph.D.
Department of Speech and Hearing Science
Arizona State University
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to