What Does sys.platform Return On 64 Bit Windows Systems?

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Wed Mar 17 18:49:20 EDT 2010


On Wed, 17 Mar 2010 16:30:19 -0500, Tim Daneliuk wrote:

> On older 32 bit Windows systems, sys.platform returns:  'win32'
> 
> What does it return on 64-bit Windows systems?  I'd check myself, but I
> don't have access to 64-bit Windows.

According to the docs, it returns win32:

http://docs.python.org/library/sys.html

If anyone knows different, this should be reported as a documentation 
bug. But 30 seconds of googling suggests that sys.platform is 'win32' 
even on 64-bit builds of Windows, by design:

http://stackoverflow.com/questions/2144748/is-it-safe-to-use-sys-platformwin32-check-on-64-bit-python



-- 
Steven



More information about the Python-list mailing list