boolean values in COM / VB / Python
John J. Lee
phrxy at csv.warwick.ac.uk
Tue Mar 27 11:58:40 EST 2001
On Mon, 26 Mar 2001, Lloyd Kvam wrote:
> My guess is that you don't have a COM wrapper in place for the
> Document. In other words:
>
> import win32com.client
> ie = win32com.client.Dispatch("InternetExplorer.Application")
> ie.Visible = 1 # toggles window visible
> ie.Visible = 0 # toggles window invisible
> ie.GetHome() # loads the home page
>
> Now when you refer to
> ie.Document
> you are actually referring to a new object.
Well, yes. And?
> I believe that you will
> need to do some work to provide the wrapper so that Python values get
> translated to the equivalent COM values.
[...]
But what would the equivalent COM values be? That's the problem! In
particular, what would be the Python for 'false' in VB? I've tried 0, -1,
'0', None, 1 and other less likely objects, and they all either don't do
anything, or pop up a box asking where to save, which would be contrary to
the docs if I were succeeding in passing something meaning 'false'.
When you talk about a 'COM wrapper', is this in the general sense, or in
some specific COM sense? I'm new to COM and windows stuff.
John
More information about the Python-list
mailing list