This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients Arfrever, barry, brett.cannon, eric.snow, lemburg, ncoghlan, ned.deily, pitrou, steve.dower, tim.golden, vstinner, zach.ware
Date 2014-12-02.17:32:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417541526.21.0.167895062525.issue22980@psf.upfronthosting.co.za>
In-reply-to
Content
Note that there's a difference between the platform's architecture (which is what get_platform() returns) and the pointer size of the currently running Python executable.

On 64-bit Linux, it's rather rare to have an application built as 32-bit executable. On 64-bit Windows, it's rather common to have 32-bit applications running.

The best way to determine 32-bit vs. 64-bit is by using the struct module:

    # Determine bitsize used by Python (not necessarily the same as
    # the one used by the platform)
    import struct
    bits = struct.calcsize('P') * 8

This should be portable across all platforms and will always refer to the pointer size of the currently running Python executable.
History
Date User Action Args
2014-12-02 17:32:06lemburgsetrecipients: + lemburg, barry, brett.cannon, ncoghlan, pitrou, vstinner, tim.golden, ned.deily, Arfrever, eric.snow, zach.ware, steve.dower
2014-12-02 17:32:06lemburgsetmessageid: <1417541526.21.0.167895062525.issue22980@psf.upfronthosting.co.za>
2014-12-02 17:32:06lemburglinkissue22980 messages
2014-12-02 17:32:05lemburgcreate