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

Jon jonathan.wright at gmail.com
Tue Feb 12 02:23:53 EST 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 libKLT32.so and
libKLT64.so

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

Thanks!

Jon



More information about the Python-list mailing list