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

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '(at': 0.03; 'python.': 0.04; 'subject:Python': 0.06; 'python': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'underlying': 0.09; 'variables.': 0.09; 'examples': 0.12; 'am,': 0.13; 'wrote:': 0.15; 'enigma': 0.16; 'kern': 0.16; 'os.environ': 0.16; 'platform)': 0.16; '>>>': 0.16; 'exists': 0.19; 'subject:Windows': 0.19; '(like': 0.21; 'header:In-Reply-To:1': 0.22; 'dictionary': 0.23; 'platforms.': 0.23; 'compiled': 0.23; 'subject:Question': 0.25; 'subject:information': 0.25; "i'm": 0.27; 'thu,': 0.28; 'interpret': 0.29; 'possible?': 0.29; 'environment': 0.29; 'subject:Getting': 0.30; 'url:library': 0.31; 'print': 0.32; 'andrew': 0.32; 'to:addr:python-list': 0.34; 'header:X-Complaints- To:1': 0.34; 'header:User-Agent:1': 0.34; 'received:24': 0.34; 'there': 0.34; 'executable': 0.35; 'machine': 0.35; 'probably': 0.35; 'running': 0.35; 'similar': 0.37; 'url:python': 0.37; 'but': 0.37; 'received:org': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'received:rr.com': 0.39; 'url:docs': 0.39; 'to:addr:python.org': 0.39; 'skip:o 30': 0.63; 'our': 0.63; 'saw': 0.64; 'world': 0.65; 'believe': 0.66; 'exact': 0.69; '10:21': 0.84; '11:33': 0.84; 'reynolds': 0.84; 'eco': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Robert Kern <robert.kern@gmail.com>
Subject Re: Question- Getting Windows 64bits information Python 32bits
Date Thu, 07 Jul 2011 11:43:55 -0500
Organization The Church of Last Thursday
References <CAEwAFDN_Ryi65MezJyLfSzps=ZQYCvJM=r0pgZtstKHZ+x5LBg@mail.gmail.com> <4E15D4F0.5040408@gmail.com> <20110707163315.GA14053@brassy.net>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host rrcs-24-227-244-203.sw.biz.rr.com
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0
In-Reply-To <20110707163315.GA14053@brassy.net>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.751.1310057059.1164.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1310057059 news.xs4all.nl 21879 [2001:888:2000:d::a6]:38528
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:9039

Show key headers only | 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