> Is there a reliable way to identify 32-bits and 64-bits Windows from
> within Python?

Not that I'm aware of.  'sys.platform=="win32" and "64 bits" in sys.version' 
will be reliable when it returns True, but it might be wrong when it returns 
False (although when it returns False, things will look a lot like a 32bit OS).

The best way I can find for the win32 API to tell you this is a combination of 
the above and the IsWow64Process() (which returns True if you are a 32bit 
process on a 64bit platform)

I'd be interested to know why you care though - ie, how will the behavior of 
your programs depend on that?  The virtualization compatibility hacks which, 
best I can tell are currently enabled for Python mean that the answer to the 
question might not be as useful as people might think.  But I'm sure valid 
reasons for wanting to know this exist, so I'd be happy to create a patch which 
add a new sys.iswow64process() process if desired.

Cheers,

Mark

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to