[Python-ideas] os.architecture
Paul Moore
p.f.moore at gmail.com
Sun Dec 29 13:39:52 CET 2013
On 29 December 2013 12:15, 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]?
I would have thought so, and more accurately too. An AMD64 executable
won't be much use on SPARC64, no matter that they are both 64-bit -
the OP doesn't have this problem as his example is for Windows (at
least as long as he's happy to ignore old Itanium systems).
I hadn't realised that platform.uname() gave this information on
Windows, but given that it does, it looks like a better solution for
the OP's problem.
Paul
More information about the Python-ideas
mailing list