473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

Gary Josack wrote:
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()?
I just tried it:

WindowsXP in Parallels Desktop:
('32bit', 'WindowsPE')

Ubuntu 7.10 in Parallels Desktop:
('32bit', '')

Ubuntu 8.04 on a AMD64 Machine:
('64bit', '')

Mac 10.4 on a Intel64 Machine:
('32bit', '')

All look correct except for Mac.

Paul

Aug 2 '08 #1
0 1322

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

Similar topics

1
by: Peter Hartmann | last post by:
Hello, I could really use some help. I'm trying to install a python program on centos4 x86_64. When I run 'python setup.py' it ends up in /usr/lib64/python2.3/site-packages/ instead of...
0
by: GDB500 | last post by:
Can you help with code to convert from 64bit to 32bit other than just A=B :confused: The full story is that I have a 64bit float in hexidecimal so first I need to get this into a 64bit float ...
28
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am developing C++ COM native code (unmanaged C++) using Visual Studio 2005. I do not take any new features of 64-bit platform, and currently my code runs fine on 32-bit...
2
by: M O J O | last post by:
(I'm using Visual Studio 2008) I want my new develloper pc to be Vista 64bit, but all my clients are so far 32bit (XP), so my questions are: 1) Is it possible for me to tell VS2008 that the...
0
by: Leo Park | last post by:
Hello, guys. I want to compile 32bit *.c and *.cc files On 64bit x86_64 systems. But, it is not work. ...
1
by: Morfys | last post by:
Hi, I would like to copy glibc/libgcc (in particular, libc.so. 6,libgcc_s.so.1) for a 32bit machine onto a 64bit machine. Would using the 32bit glibc/libgcc on the 64bit machine work? The...
8
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
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...
3
by: sudhivns | last post by:
Hi , Does Volume Shadow Copy Service 7.2 SDK work with XP 64bit platform. We have seen issues with compiling(using vssapi.lib ) the c++ application. Same SDK work for XP 32bit and XP 64bit ?...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.