[python-win32] How do I detect a 64 bit version of Windows?
gelonida at gmail.com
Sun Feb 19 04:11:39 CET 2012
On 02/18/2012 09:07 PM, Brian Curtin wrote:
> On Sat, Feb 18, 2012 at 13:22, Gremlin <gremlin at armarize.com> wrote:
> import platform
> That will return "AMD64" on 64 bit. I don't have a 32-bit machine
> available but I believe it returns "x86".
This suggestion will not work for the OP.
It will tell you the platform, for which python was compiled and not the
real platform of the machine you're running on.
If you installed a 32 bit version of python on a 64 bit machine You will
get 'x86', which would be the wrong answer considering the OP's
> ps, I can't find your thread on the IronPython list right now, but
> platform.architecture() will help you find the architecture Python is
> compiled for.
More information about the python-win32