On Jul 16, 6:10 am, [EMAIL PROTECTED] 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? >
>>> import sys >>> hex(sys.maxint) '0x7fffffff' >>> x = sys.maxint >>> n = 1 >>> while x: ... n += 1 ... x >>= 1 ... >>> n 32 WARNING: Assumes nobody will be silly enough to build a machine with ones-complement integers in future :-) -- http://mail.python.org/mailman/listinfo/python-list