Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9039

Re: Question- Getting Windows 64bits information Python 32bits

From Robert Kern <robert.kern@gmail.com>
Subject Re: Question- Getting Windows 64bits information Python 32bits
Date 2011-07-07 11:43 -0500
Organization The Church of Last Thursday
References <CAEwAFDN_Ryi65MezJyLfSzps=ZQYCvJM=r0pgZtstKHZ+x5LBg@mail.gmail.com> <4E15D4F0.5040408@gmail.com> <20110707163315.GA14053@brassy.net>
Newsgroups comp.lang.python
Message-ID <mailman.751.1310057059.1164.python-list@python.org> (permalink)

Show all headers | View raw


On 7/7/11 11:33 AM, Philip Reynolds wrote:
> On Thu, 07 Jul 2011, Andrew Berg wrote:
>
>> On 2011.07.07 10:21 AM, António Rocha wrote:
>>> 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.
>> os.environ['processor_architecture']
>>
>> os.environ is a dictionary of system environment variables. That exact
>> key probably only exists on Windows, but I'm there is a similar key on
>> other platforms.
>
> $ python -c 'import platform; print platform.architecture()'
> ('64bit', 'ELF')
>
>    http://docs.python.org/library/platform.html

This is not what the OP is looking for. The OP wants to know what the CPU and OS 
are capable of, not what the Python executable is compiled for. 
platform.architecture() gives the latter.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Question- Getting Windows 64bits information Python 32bits Robert Kern <robert.kern@gmail.com> - 2011-07-07 11:43 -0500

csiph-web