[Python-ideas] os.architecture

anatoly techtonik techtonik at gmail.com
Mon Dec 30 00:54:29 CET 2013


On Mon, Dec 30, 2013 at 2:30 AM, Stephen J. Turnbull <stephen at xemacs.org> wrote:
> anatoly techtonik writes:
>  > On Sun, Dec 29, 2013 at 3:15 PM, Chris Angelico <rosuav at gmail.com> wrote:
>
>  > If Python is about readability then looking at your example, I have
>  > two questions:
>  > 1. What is platform - hardware, CPU, OS, Python flavor?
>
> Everything you might want in this area.

I want to know if I am running 32-bit or 64-bit Windows on my 64-bit CPU.
So, how to resolve the ambiguity?

> (Note: 'os' is the wrong
> namespace for this.  'os' provides wrappers for OS services, not
> platform information.)  In particular

For OS information, 'os' is a logical namespace.
I don't know about CPU info though. Would be nice to have 'hardware'
or 'hwinfo' module in stdlib.
I don't know where info about Python bitness should be.

>>>> import platform
>>>> platform.architecture()
> ('64bit', '')
>>>> ^D


More information about the Python-ideas mailing list