Question- Getting Windows 64bits information Python 32bits

Brian Curtin brian.curtin at gmail.com
Thu Jul 7 19:15:20 CEST 2011


2011/7/7 António Rocha <toyze.rocha at gmail.com>

> Greetings
>
> I'm running Python (32b) in Windows7 (at 64bits) and I would like to know
> how can I check if my machine is a 32b or 64b in Python. Is it possible? I
> saw a few examples (like platform) but they only provide information about
> Python not the machine.
> Thanks
> Toze
>

Running CPython compiled for 32-bit on a Windows 7 64-bit machine gives the
following:

>>> platform.architecture()
('32bit', 'WindowsPE')
>>> platform.machine()
'AMD64'

This didn't used to be the case - it was corrected in
http://bugs.python.org/issue7860 so you may need to upgrade to get accurate
information if you have an older Python installed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110707/2e59d044/attachment.html>


More information about the Python-list mailing list