Newbie in win32com: getters and setters
Raaijmakers, Vincent (IndSys,
Raaijmakers, Vincent (IndSys,
Thu Oct 23 17:57:11 EDT 2003
Newbie question.
Until now, I was able to work with all my COM objects until...
the class I want to use doesn't contain methods (attributes) but just tables:
class HelloWorld(DispatchBaseClass):
"""HelloWorld Interface"""
CLSID = IID('{95A19265-0F7F-11D3-8150-00104B2A983D}')
coclass_clsid = IID('{95A19266-0F7F-11D3-8150-00104B2A983D}')
_prop_map_get_ = {
"Hello": (8, 2, (3, 0), (), "Hello", None)
)
_prop_map_put_ = {
Hello": ((8, LCID, 4, 0),())
Now I'm lost. makepy didn't create the getters and setters, so how to get and set the values of Hello?
So I tried:
self.message = Dispatch("Messages.HelloWorld") ## works fine
##but now??
hello = self.message._prop_map_get_('Hello')
##So what is my value now?
This looks so ugly and I don't even know what my value is. I expect just one value.
Please guide me to some tips/tricks/documentations.
Google search provided me only with huge Outlook examples.
Thanks,
Vincent
More information about the Python-list
mailing list