[python-win32] Can't access methods of COM object.
Robert Norman
rnorman at acpropulsion.com
Fri Nov 5 20:18:20 CET 2010
I have been successful in the past using COM from Python to control
ActiveX elements such as LabView programs and a few third-party device
servers. I recently tried to integrate a new component which came with
a LabView example and some Visual Basic sample code. The LabView example
works for me and I can examine the methods and properties of the server
but I can't seem to do anything with the server from Python.
I can successfully get an instance with:
>>>ps = Dispatch("PPServer.PPServerClass")
>>>ps
<win32com.gen_py.PPServer 1.0 Type Library.IPPServerClass instance at
0x20239664>
>>>cha = ps.ChannelA <--- Fails
and none of the expected methods or properties are exposed except those
seen in the attached genpy file.
The VB example shows:
Set pps = New PServer
cha = pps.ChannelA
I've tried various combinations, in Python, of ps.ChannelA, ps.Start()
etc and none of the documented methods or properties seem to work.
Any thoughts on how to proceed?
Thanks
Rob
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 23D1AE21-8023-11D3-8D47-00C04F949D33x0x1x0.py
URL: <http://mail.python.org/pipermail/python-win32/attachments/20101105/da7a55c6/attachment.ksh>
More information about the python-win32
mailing list