identifying 64-bit Windows from 2.3.5?

S

Steven Knight

If I have installed 2.3.5 from the python.org Windows installer, can
any one point me to a run-time way to identify whether I'm running on
a 32-bit vs. 64-bit version of Windows XP, given that Python itself was
built on/for a 32-bit system?

I hoped sys.getwindowsversion() was the answer, but it returns the same
platform value (2) on both 32-bit and 64-bit systems. sys.platform
("win32") and sys.maxint are both set at compile time. Things like
os.uname() aren't on Windows.

Can some Windows-savvy Pythonista point me to some way to distinguish
between these two?

Thanks,

--SK
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Steven said:
Can some Windows-savvy Pythonista point me to some way to distinguish
between these two?

I would look at the environment variable PROCESSOR_ARCHITECTURE. On
the Win64 machine I use, its value is "IA64".

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
VetaMcRae
Top