This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brian.curtin
Recipients brian.curtin
Date 2010-02-05.18:07:47
SpamBayes Score 8.873407e-08
Marked as misclassified No
Message-id <1265393270.5.0.356323623138.issue7860@psf.upfronthosting.co.za>
In-reply-to
Content
When running 32-bit Python on a 64-bit version of Windows, therefore running the process in WOW64 mode, platform.machine returns a misleading value. When running in WOW64, the processor architecture is masked to appear as "x86" when the machine is actually "AMD64" (which you see on a 64-bit app on 64-bit OS).

The change involves looking at an environment variable only set on WOW64 processes to see the native architecture. See http://blogs.msdn.com/david.wang/archive/2006/03/26/HOWTO-Detect-Process-Bitness.aspx

The patch does not include any test, as I'm not really sure how you could test this without using the change itself to figure out when it should be tested. Suggestions would be appreciated.
History
Date User Action Args
2010-02-05 18:07:50brian.curtinsetrecipients: + brian.curtin
2010-02-05 18:07:50brian.curtinsetmessageid: <1265393270.5.0.356323623138.issue7860@psf.upfronthosting.co.za>
2010-02-05 18:07:49brian.curtinlinkissue7860 messages
2010-02-05 18:07:48brian.curtincreate