[Distutils] [RFC] PEP 345 and PEP 386 updates

David Cournapeau david at ar.media.kyoto-u.ac.jp
Wed Oct 21 03:45:47 CEST 2009

Tarek Ziadé wrote:
> No, the architecture is given by platform.machine() so you have it already,
> by combining a test with sys.platform.

But platform.machine() returns a 32 bits machine if you run 32 bits
python on 64 bits windows. AFAIK, the only reliable way is to use the
win32 API:


In scons (where we limit ourself to pure python code ATM), we tried the
registry, but this is not reliable (some braindead softwares install
WoW64 registry keys even on 32 bits windows). OTOH, I guess not that
many applications need this information: after all, the whole point of
WoW64 is to virtualize 32 bits applications so that they believe to run
on a conventional 32 bits python.


More information about the Distutils-SIG mailing list