[python-win32] Boolean type changed in Python 3.0?

Sunny Carter Sunny.Carter at metaswitch.com
Wed Jan 27 17:21:01 CET 2010


Mark - just wondered if you had any update on this?

I'm very happy to run some diagnostic tests for you on my setup, if this would help? If you need to send me debug versions or anything then please do, or let me know if I can provide any further info that would help to diagnose.

I can do my best to net down the problem and promise not to just spam you with any output - I spend my days debugging various other problems so am pretty familiar with providing useful info.

Thanks, appreciate it.

Sunny 

-----Original Message-----
From: Mark Hammond [mailto:skippy.hammond at gmail.com] 
Sent: 05 January 2010 07:58
To: Sunny Carter
Cc: python-win32 at python.org
Subject: Re: [python-win32] Boolean type changed in Python 3.0?

On 5/01/2010 3:51 AM, Sunny Carter wrote:
> Hi all,
> I'm trying my posting again with a different subject so that it is 
> more generic.
> I am having problems calling across the win32 API using a Boolean 
> argument in Python 3.0 (False in my python script) which is not 
> recognised as a Boolean (The error I get back from setattr is 'Boolean 
> value expected').
> Has the way that a Boolean is represented changed in Python 3.0? This 
> worked fine in Python 2.6. I cannot get it to work and have tried 
> values of False,True,0 and 1, all to no avail.
> It sounds like a bug in the win32com API for 3.0 to me.
> Further details below.
> Many thanks to anyone that can help,

I expect something subtle is going on with boolean conversions in 3.x, but the test suite does have coverage of booleans, so I'm really not sure what the problem could be.  I don't have photoshop so I'm unable to reproduce - I intend revisiting the tests to see if I can spot an edge case which isn't tested, but I'm yet to get to that after the holidays...

Cheers,

Mark


More information about the python-win32 mailing list