Hello,
how can I determine the architecture (32 or 64bit) with python 2.2 on
Windows or Unix (AIX, Solaris) OS, without the modul platform?
Thanks for your hints, Kai 6 4887
On Jun 19, 9:17 pm, Kai Rosenthal <kairosent...@tiscali.dewrote:
Hello,
how can I determine the architecture (32 or 64bit) with python 2.2 on
Windows or Unix (AIX, Solaris) OS, without the modul platform?
Thanks for your hints, Kai
What happens when you fire up a 64-bit Python and type
import sys; sys.maxint
at it?
On Jun 19, 4:28 pm, John Machin <sjmac...@lexicon.netwrote:
On Jun 19, 9:17 pm, Kai Rosenthal <kairosent...@tiscali.dewrote:
Hello,
how can I determine the architecture (32 or 64bit) with python 2.2 on
Windows or Unix (AIX, Solaris) OS, without the modul platform?
Thanks for your hints, Kai
What happens when you fire up a 64-bit Python and type
import sys; sys.maxint
at it?
That's not suitable, because of the differences between LP64 and LLP64
( http://en.wikipedia.org/wiki/64-bit#64-bit_data_models ).
Try
python -c "import struct; print struct.calcsize('P')"
instead. That calculates the size of a pointer.
David Rushby wrote:
On Jun 19, 4:28 pm, John Machin <sjmac...@lexicon.netwrote:
>On Jun 19, 9:17 pm, Kai Rosenthal <kairosent...@tiscali.dewrote:
>>Hello, how can I determine the architecture (32 or 64bit) with python 2.2 on Windows or Unix (AIX, Solaris) OS, without the modul platform? Thanks for your hints, Kai
What happens when you fire up a 64-bit Python and type import sys; sys.maxint at it?
That's not suitable, because of the differences between LP64 and LLP64
(http://en.wikipedia.org/wiki/64-bit#64-bit_data_models ).
Try
python -c "import struct; print struct.calcsize('P')"
instead. That calculates the size of a pointer.
How about :
tuple.__itemsize__
since each tuple item is a pointer.
--
Lenard Lindstrom
<le***@telus.net>
Kai Rosenthal schrieb:
how can I determine the architecture (32 or 64bit) with python 2.2 on
Windows or Unix (AIX, Solaris) OS, without the modul platform?
On Windows, the architecture is always 32-bit, as Python 2.2 does not
support Win64. On Unix, looking for sys.maxint is enough for AIX
and Solaris.
Regards,
Martin
>What happens when you fire up a 64-bit Python and type
> import sys; sys.maxint at it?
That's not suitable, because of the differences between LP64 and LLP64
(http://en.wikipedia.org/wiki/64-bit#64-bit_data_models ).
For the systems that the OP mentioned, sys.maxint is just fine:
AIX and Solaris both use LP64, and Windows is 32-bit only for
Python 2.2.
Regards,
Martin
On 6/19/07, Kai Rosenthal <ka**********@tiscali.dewrote:
Hello,
how can I determine the architecture (32 or 64bit) with python 2.2 on
Windows or Unix (AIX, Solaris) OS, without the modul platform?
Thanks for your hints, Kai
For Unix systems you can probably use os.uname() and check what
architecture the kernel is built for. For example,
evan@thinkpad ~ $ python -c 'import os; print os.uname()[4]'
i686
As you can see, I'm on a 32 bit system.
--
Evan Klitzke <ev**@yelp.com> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ketulp_baroda |
last post by:
Hi
Does python support MVC architecture? Java has register & notify
obsever methods in javax.util . Does python has these functions. If
not then how to register the views with the models & how to...
|
by: Lenard Lindstrom |
last post by:
I was wondering if anyone has suggested having Python determine
a method's kind from its first parameter. 'self' is a de facto
reserved word; 'cls' is a good indicator of a class method
( __new__...
|
by: Fritz Bosch |
last post by:
We are in the process of refactoring our GUI-based test application
for radio equipment and are rewriting a significant part in Python.
The new architecture will substantially be based on the...
|
by: limeydrink |
last post by:
Hi all,
I want to create a mobile field worker data solution.
Let me explain...
I work for a company that has some software used by call takers to
enter information into a database about...
|
by: tommak |
last post by:
It's a dream of human beings to build machines that can think and
behave like human beings. The most important part of of such a machine
is an artificial mind that can emulate the cognitive...
|
by: Samuel |
last post by:
Hi,
I am looking for some recommendations for client/server technologies and
for the communication involved.
I am currently planning to port a Perl application that has grown out of...
|
by: varuns |
last post by:
hi
where i can find the architecture of python as i want to know the internal implementation of python
bye
|
by: Arnaud Delobelle |
last post by:
Hi fellow python enthusiasts.
Having recently acquired a MacBook Pro (Intel Core 2 Duo) which comes
with python2.5, I have been installing some modules that I need (PIL,
psycopg2, PyXML ...).
...
|
by: BA |
last post by:
Hi Everyone,
I have an application that sits behind a server farm, the application needs
to pass its NLB IP address in the message that it sends to another service.
From C# code, how can I...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: 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,...
|
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...
|
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...
|
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,...
| |