473,549 Members | 2,584 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?

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?

Thanks, Ken
=============== =============== =============
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 the code. On Linux you should be able to uname -m and
get a pretty good idea. See man uname.

something like:
#contents of t.py
#-----------
import os
zstatflg= os.system("unam e -m")
#----------- EOF ---
then:
python t.py
i686

(I'm running a stock Python 2.5.2)

If the Python itself was compiled 32 bit and installed on a 64 bit
machine that runs 32 bit code (like most all do during transition times)
then all attempts with Python to check itself will return 32 bit
responses. Using math and/or 'kibitz' (cheater text) will be useless.

Hope this helps;

Steve
no******@hughes .net
Jul 16 '08 #1
0 843

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

Similar topics

1
3034
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 /usr/lib/python2.3/site-packages. It's a problem because the program I'm trying to install is a dependency for something that is only 32bit. How can I...
0
2910
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 Then using ANDs and Divides extract the Exponent and Mantissa and then get it into a 32bit float Thanks
28
2712
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 platform (e.g. Windows XP SP2). Now I am researching how to build my code for 64-bit platform (e.g. Windows 2003 Server 64-bit R2)? Any options I need...
2
2160
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 output should be 32bit? That is devellop dotnet on a 64bit machine and output 32bit program? 2) When later this year, all my clients are updgraded...
0
2977
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. --------------------------------------------------------------------------------------------------------------- bmk_mgr@ikdp101: gcc --version gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)
1
3465
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 reason I ask is that I've been getting the following error: Bin/libc.so.6: symbol _dl_out_of_memory, version GLIBC_PRIVATE not defined in file...
1
1876
by: =?Utf-8?B?RGFuaWVs?= | last post by:
Hi all, I built an app with the "Platform target" of x86. Then I installed it as a Windows Service. When it's running, I can see in the Task Manager that the executable has "*32" following it, which I think means it's running in 32bit. But after I changed the log on account of the service, the "*32" disappeared and it's running in 64bit. Is...
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 is. I thought platform.uname() or just platform.processor() would have done it, but python returns an empty string on windows. Any ideas? ...
0
1336
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', '')
3
5238
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 ? Are there any architecture(Intel,AMD) specific libraries on XP. Regards, Sudhi
0
7723
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7965
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7483
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6051
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5375
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3504
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3487
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1949
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 we have to send another system
0
771
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.