determine 32 or 64 bit architecture with python 2.2

Evan Klitzke evan at
Wed Jun 20 07:22:14 CEST 2007

On 6/19/07, Kai Rosenthal <kairosenthal at> wrote:
> 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 at thinkpad ~ $ python -c 'import os; print os.uname()[4]'

As you can see, I'm on a 32 bit system.

Evan Klitzke <evan at>

More information about the Python-list mailing list