How to pass true or false to COM objects?

Gillou nospam at bigfoot.com
Sun Aug 18 14:39:13 EDT 2002


Using 1 and 0 works for me and MSXML4.0. Here's the way I initialize a DOM
parser...
Or perhaps you need to pass a true/false expression to a specific method.

== SNIP==
import win32com.client
...
TRUE = 1
FALSE = 0
class MSXMLEvents:
    def Ononreadystatechange(self):
    # handle errors if any
    ...
    def Onondataavailable(self):
    ...
CLSID_DOMDocument = 'Msxml2.DOMDocument.4.0'
Ox = win32com.client.DispatchWithEvents(CLSID_DOMDocument, MSXMLEvents)
Ox.setProperty("SelectionLanguage", "XPath")
Ox.validateOnParse = TRUE
Ox.resolveExternals = TRUE
Ox.async = FALSE
Ox.preserveWhiteSpace = FALSE
...
===/SNIP===

HTH

--Gilles

>>> from base64 import decodestring
>>> replyTo = decodestring('Z2xlbmZhbnRAYmlnZm9vdC5jb20=\n')

"Sunit Joshi" <sjoshi at ingr.com> a écrit dans le message de news:
8f8ffe67.0208161214.4a39ce42 at posting.google.com...
> Hello All
> I'm using MSXML4.0 and need to pass 'true' or 'false' values to the
> COM object. Could someone tell me how to do that..??
>
> thanks
> Sunit
> sjoshi at ingr.com




More information about the Python-list mailing list