FAQ
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.

TIA,

--
----------------------------------------------------------------------------
Tim Daneliuk tundra at tundraware.com
PGP Key: http://www.tundraware.com/PGP/

Search Discussions

  • Steven D'Aprano at Mar 17, 2010 at 10:49 pm

    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
  • Christian Heimes at Mar 17, 2010 at 11:16 pm

    Tim Daneliuk schrieb:
    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.
    Do you want to know if the current build of Python is a 32 or 64bit build?
    import struct
    struct.calcsize("P") * 8
    64

    Christian

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 17, '10 at 9:30p
activeMar 17, '10 at 11:16p
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase