[Python-ideas] os.architecture

Amber Yust amber.yust at gmail.com
Sun Dec 29 21:53:15 CET 2013


Until an architecture that differs in more than just number of bits comes
out, at which point 'os.architecture == 32' starts becoming awkward.

On Sun Dec 29 2013 at 12:34:09 PM, anatoly techtonik <techtonik at gmail.com>
wrote:

> On Sun, Dec 29, 2013 at 3:15 PM, Chris Angelico <rosuav at gmail.com> wrote:
> > On Sun, Dec 29, 2013 at 10:28 PM, anatoly techtonik <techtonik at gmail.com>
> wrote:
> >> if os.architecture == 32:
> >>   download('http://www.libsdl.org/release/SDL2-2.0.1-win32-x86.zip')
> >> else:
> >>   download('http://www.libsdl.org/release/SDL2-2.0.1-win32-x64.zip')
> >>
> >
> > Could you get that info from platform.uname()[4]?
>
> If Python is about readability then looking at your example, I have
> two questions:
> 1. What is platform - hardware, CPU, OS, Python flavor?
> 2. What is uname()[4]?
>
> For os.architecture I have only one question - what is the returned
> value? And it is easy to remember once you get it. It is also easy to
> debug.
> --
> anatoly t.
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20131229/f5312057/attachment-0001.html>


More information about the Python-ideas mailing list