[Python-ideas] os.architecture

anatoly techtonik techtonik at gmail.com
Sun Dec 29 20:38:39 CET 2013


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.


More information about the Python-ideas mailing list