>>> import platform
>>> platform.architecture()
('64bit', '')
Run on my Mac OS X 10.8.4. Note that your Python executable may be a universal binary, in which case you could get the wrong architecture quoted:
Note
: On Mac OS X (and perhaps other platforms), executable files may be universal files containing multiple architectures.
You can also test sys.maxsize
:
>>> sys.maxsize > 2**32
True
The above would return False
if you were running a 32-bit platform.