In article <[EMAIL PROTECTED]>,
Robin Becker <[EMAIL PROTECTED]> wrote:
>Michael Yanowitz wrote:
>..
>>
>>> I need to detect whether the operating system I am running on (not the
>>> Python version) is 64bit or 32bit. One requirement is that I need to
>>> include support for non-Intel/AMD
Michael Yanowitz wrote:
> The one thing I observed (just an observation) is that:
> a) on 32-bit machines:
> sizeof(int) = 32
> sizeof(long) = 32
> b) on 64-bit machines:
> sizeof(int) = 32
> sizeof(long) = 64
>
> This in C and Python.
As I've said previously in this threa
Michael Yanowitz wrote:
..
>
>> I need to detect whether the operating system I am running on (not the
>> Python version) is 64bit or 32bit. One requirement is that I need to
>> include support for non-Intel/AMD architectures.
>
> The standard C way would be to check sizeof(void *).
so on t
PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Lawrence D'Oliveiro
Sent: Monday, July 10, 2006 3:11 AM
To: python-list@python.org
Subject: Re: Detecting 64bit vs. 32bit Linux
In article <[EMAIL PROTECTED]>,
dwelch91 <[EMAIL PROTECTED]> wrote:
>I need to detect whether the o
In article <[EMAIL PROTECTED]>,
dwelch91 <[EMAIL PROTECTED]> wrote:
>I need to detect whether the operating system I am running on (not the
>Python version) is 64bit or 32bit. One requirement is that I need to
>include support for non-Intel/AMD architectures.
The standard C way would be to che
Jim Segrave wrote:
> In article <[EMAIL PROTECTED]>,
> dwelch91 <[EMAIL PROTECTED]> wrote:
>> I need to detect whether the operating system I am running on (not the
>> Python version) is 64bit or 32bit. One requirement is that I need to
>> include support for non-Intel/AMD architectures.
>>
>> T
"MrJean1" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Try function architecture() from the platform module in Python 2.3 and
> 2.4. The first item of the returned tuple shows whether the underlying
> system is 64-bit capable.
>
> Here is what it returns on RedHat Fedora Core 2 Li
Try function architecture() from the platform module in Python 2.3 and
2.4. The first item of the returned tuple shows whether the underlying
system is 64-bit capable.
Here is what it returns on RedHat Fedora Core 2 Linux on Opteron:
>>> platform.architecture()
('64bit', 'ELF')
>>> platform.unam
In article <[EMAIL PROTECTED]>,
dwelch91 <[EMAIL PROTECTED]> wrote:
>I need to detect whether the operating system I am running on (not the
>Python version) is 64bit or 32bit. One requirement is that I need to
>include support for non-Intel/AMD architectures.
>
>The 2 ways I have thought detecti
I need to detect whether the operating system I am running on (not the
Python version) is 64bit or 32bit. One requirement is that I need to
include support for non-Intel/AMD architectures.
The 2 ways I have thought detecting 64bit are:
1. struct.calcsize("P") == 8
2. '64' in os.uname()[4]
I'm
10 matches
Mail list logo