David Carter wrote:
>>-----Original Message-----
>>From: Robert Brewer [mailto:[EMAIL PROTECTED] 
>>Sent: Friday, February 17, 2006 4:11 PM
>>To: David Carter; python-win32@python.org
>>Subject: RE: [python-win32] Using win32com Constants
>>
>>
>>David Carter wrote:
>>
>>>Why is it that when I want to use a win32COM constant such as 
>>>acViewNormal in an MS Access COM automation session I find I
>>>have to use some convoluted thing like:
>>>
>>>     ComConstants = 
>>>win32com.client.constants.__dict__["__dicts__"][0]
>>>     viewtype = ComConstants['acViewNormal']
>>>
>>>Am I missing something obvious? 
>>
>>Are you calling Dispatch before referencing the constants?
>>
>>http://aspn.activestate.com/ASPN/docs/ActivePython/2.3/pywin32
 >
> Yes, -those- constants work fine. They're the application specific constants
> that require the convolution.

He wasn't suggesting that Dispatch wasn't working, but rather pointing out 
that the constants don't work until *after* you've called Dispatch.

The way to use the constants (after calling Dispatch) is like this:

 >>> win32com.client.constants.acViewNormal

If that's not working, then I'd say there's nothing *too* obvious that you're 
missing.  You've obviously run makepy, otherwise even the convolution wouldn't 
work...

-drg
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to