-----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:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAki NU6IACgkQI2zpkm cEAhi6sACgo1ZyG KCWtnBPLXr1EjgS q3V4
GEAAoL+zZStfGYa Zxg/zYoUqk6UFa+oM
=g+tz
-----END PGP SIGNATURE-----
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:
>
If just for Windows I believe you can use the "PROCESSOR_ARCH ITECTURE"
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.p y" module that might help if you need to do this
for other platforms:
>
>
>
Cheers,
Trent
>
>>
> 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.proces sor() would have
> done it, but python returns an empty string on windows. Any ideas?
> 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.proces sor() 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_ARCH ITECTURE"
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.p y" module that might help if you need to do this
for other platforms:
>
>
>
Cheers,
Trent
>
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAki NU6IACgkQI2zpkm cEAhi6sACgo1ZyG KCWtnBPLXr1EjgS q3V4
GEAAoL+zZStfGYa Zxg/zYoUqk6UFa+oM
=g+tz
-----END PGP SIGNATURE-----