473,513 Members | 2,275 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: How to figure out if the platform is 32bit or 64bit?

Trent Mick wrote:
Manuel Vazquez Acosta wrote:
>-----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"

I believe that was already suggested in this thread. That test will
just tell you if the Python *build* is 32-bit or 64-bit. If the answer
is 32-bit, then that doesn't tell you if this is a 32-bit Python
running on a 64-bit OS.

Trent
have you tried platform.architecture()?
Jul 29 '08 #1
0 1002

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5935
by: kjhishere | last post by:
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...
0
841
by: norseman | last post by:
=========================================== From what I'm reading I think the answer lies in being able to see Microsoft's OS 'About' statement. One of the Python guru's should be able to supply...
0
147
by: Trent Mick | last post by:
norseman wrote: 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...
0
201
by: Manuel Vazquez Acosta | last post by:
-----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"
0
1329
by: Paul McNett | last post by:
Gary Josack wrote: I just tried it: WindowsXP in Parallels Desktop: ('32bit', 'WindowsPE') Ubuntu 7.10 in Parallels Desktop: ('32bit', '')
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
5693
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5098
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3230
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.