idiom to ask if you are on 32 or 64 bit linux platform?

Jon jonathan.wright at
Tue Feb 12 08:23:53 CET 2008

Hello everyone,

I've got a ctypes wrapper to some code which seems to be different
when compiled on 32 bit linux compared to 64 bit linux. For the
windows version I can use sys.platform == 'win32' versus 'linux2' to
decide whether to get the .dll or .so library to load. Having narrowed
it down to linux I still need to choose between and

Can someone tell me an idiom to choose the right one?



More information about the Python-list mailing list