Marc-Andre Lemburg added the comment:
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.
----------
nosy: +lemburg
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22980>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com