AW: COM / Variants / VT_BOOL

Stefan Migowsky smigowsky at dspace.de
Fri Dec 22 07:42:24 CET 2000


You do not need to create a VARIANT ! The win32com library automatically
converts almost all Python objects to the corresponding VARIANT type. 
Since VT_BOOL is just an int which is transmitted through the COM channel 
you can use the simple Python 1 or 0, e.g. 
server = win23com.client.Dynamic("XXX")

server.Enabled = 1 # Set to true
server.Enabled = 0 # Set to false


  Stefan

-----Ursprüngliche Nachricht-----
Von: frankmcgeough at my-deja.com [mailto:frankmcgeough at my-deja.com]
Gesendet: Freitag, 22. Dezember 2000 03:44
An: python-list at python.org
Betreff: COM / Variants / VT_BOOL


Simple questions. How do I create a variant in Python? How do I set
that variant to hold a VT_BOOL?
More complicated question. Why is this info so hard to find? I would
think it would come up a lot if folks are trying to use the
win32com.client.
Thanks for any clues, Frank


Sent via Deja.com
http://www.deja.com/
-- 
http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list