Determining Processor Vender

John Machin sjmachin at lexicon.net
Fri Sep 5 17:22:27 EDT 2008


On Sep 6, 5:07 am, aha <aquil.abdul... at gmail.com> wrote:
> On Sep 5, 3:00 pm, aha <aquil.abdul... at gmail.com> wrote:
>
> > Dose anyone know of a cross-platform method for determining the vendor
> > of a processor?  Under linux I can check /proc/cpuinfo.  What I'd like
> > to be able to do is determine if a processor is AMD or Intel, so that
> > I can use the appropriate numerical libraries for my application.
>
> > Regards,
>
> > Aquil
>
> Additionally, I've tried the platform module...platform.processor() on
> my 64-bit AMD system, under Linux, returns x86_64.  And under windows
> retruns an empty string ''

This may help with Windows. My setup: (XP SP 2), Python 2.5.2. The
chip is an AMD Turion Mobile which is 64-bit but is running 32-bit
Windows.

>>> import os
>>> from pprint import pprint as pp
>>> pp(dict((k, v) for (k, v) in os.environ.items() if 'PROCESSOR' in k))
{'NUMBER_OF_PROCESSORS': '1',
 'PROCESSOR_ARCHITECTURE': 'x86',
 'PROCESSOR_IDENTIFIER': 'x86 Family 15 Model 36 Stepping 2,
AuthenticAMD',
 'PROCESSOR_LEVEL': '15',
 'PROCESSOR_REVISION': '2402'}
>>>

Cheers,
John



More information about the Python-list mailing list