[python-win32] Accessing other than default COM interface
Wikström Sven
sven.wikstrom at scania.com
Fri Apr 20 13:45:07 CEST 2007
Hi.
I'm a COM newbie so please excuse my ignorance!
I have a coclass exposing a set of interfaces to COM:
coclass ICAList {
[default] interface _ICAList;
interface _Object;
interface IList;
interface ICollection;
interface IEnumerable;
};
The default interface "ICAList" does not have an indexer nor GetItem function, so I would like to access the non default "IList" interface.
Desired usage of indexer:
>> p = win32com.client.Dispatch("test.Class1");
>> list = p.GetICAList()
>> # Get the "IList" interface instead....somehow....?
>> for item in range(0, 5):
>> print list[item].Name
Can this be done in Python 2.2?
Many thanks.
/Sven
More information about the Python-win32
mailing list