-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Just test for maxint value:
from sys import maxint if maxint >> 33: print "more than 32 bits" # probably 64 else: print "32 bits" Best regards, Manuel. Trent Mick wrote: > norseman wrote: >> >> > > I need to know if I'm running on 32bit or 64bit ... so far I haven't >> > > come up with how to get this info via python. sys.platform returns >> > > what python was built on ... but not what the current system is. >> > > >> > > I thought platform.uname() or just platform.processor() would have >> > > done it, but python returns an empty string on windows. Any ideas? > > If just for Windows I believe you can use the "PROCESSOR_ARCHITECTURE" > environment variable -- at least on NT-based Windows versions. > > Values are x86 (32-bit), IA64 (64-bit) and AMD64 (64-bit). > > Here is a "platinfo.py" module that might help if you need to do this > for other platforms: > > http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/util/platinfo.py > > > Cheers, > Trent > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkiNU6IACgkQI2zpkmcEAhi6sACgo1ZyGKCWtnBPLXr1EjgSq3V4 GEAAoL+zZStfGYaZxg/zYoUqk6UFa+oM =g+tz -----END PGP SIGNATURE----- -- http://mail.python.org/mailman/listinfo/python-list