[Python-Dev] Reminder: last alphas next Wednesday 07-May-2008
"Martin v. Löwis"
martin at v.loewis.de
Fri May 2 08:26:20 CEST 2008
> Is there a reliable way to identify 32-bits and 64-bits Windows from within
> Python? I have not found any yet, but it might be a mere oversight on my
> behalf.
>
> The reason I ask is that both return win32, which is most likely a reference
> to the API, even when having installed the 64 bits Python version. This, of
> course, by using win32 causes some issues with, for example, setuptools
> since it generate an egg with a win32 identifier. Now if you have Python C
> extension code it will be 64-bit compiled, thus not working on 32-bits
> Windows.
It seems you don't want to identify whether the Windows installation is
a Win64 one, but whether the Python installation is, right?
For this, you should use platform.architecture()[0]
Regards,
Martin
More information about the Python-Dev
mailing list