473,383 Members | 1,834 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,383 software developers and data experts.

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.processor() 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("uname -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 838

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...
1
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,...
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: 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
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.