[python-win32] COM Base Class and derived classes
Tibor Arpas
tibor.arpas at infinit.sk
Tue Jul 15 16:20:17 CEST 2008
Hi,
I'm new to both python and COM. I try to use the win32com.client. Many
things work like a charm, but I bumped into following problem. The COM
server has following hierarchy of types:
Component (Base class)
-----Folder
-----Drawing
-----Image
-----Form
-----Script
----- ......
The components are stored in a collection. When I try to access specific
component in my script I'm always getting the instance of "Component".
>>> s.Document.ComponentSet['MyDrawing']
.... instance of Component ......
When I try the same thing in IronPython (the COM component has also .NET
interface and I use the clr library from IronPython), I get the specific
type. This confirms that at least some of my assumptions are right.
>>>s.Document.ComponentSet["MyDrawing"]
<DrawingClass object at 0x0000000000000031>
Can anybody give some pointers where to look and what to check?
Regards,
Tibor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080715/49d96ad8/attachment.htm>
More information about the python-win32
mailing list