AW: COM / Variants / VT_BOOL

Stefan Migowsky smigowsky at
Fri Dec 22 01:42:24 EST 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


-----Ursprüngliche Nachricht-----
Von: frankmcgeough at [mailto:frankmcgeough at]
Gesendet: Freitag, 22. Dezember 2000 03:44
An: python-list at
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
Thanks for any clues, Frank

Sent via

More information about the Python-list mailing list