Message232030
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. |
|
Date |
User |
Action |
Args |
2014-12-02 17:32:06 | lemburg | set | recipients:
+ lemburg, barry, brett.cannon, ncoghlan, pitrou, vstinner, tim.golden, ned.deily, Arfrever, eric.snow, zach.ware, steve.dower |
2014-12-02 17:32:06 | lemburg | set | messageid: <1417541526.21.0.167895062525.issue22980@psf.upfronthosting.co.za> |
2014-12-02 17:32:06 | lemburg | link | issue22980 messages |
2014-12-02 17:32:05 | lemburg | create | |
|