System information on Windows?

Roger Upole rupole at compaq.net
Tue Sep 19 18:55:22 EDT 2000


If you don't mind installing WMI (a free download from Microsoft)
on all the machines in question, you can do things like this:

import win32com.client
wmi = win32com.client.Dispatch('wbemscripting.swbemlocator')
rmt_mach = wmi.ConnectServer('machine name')
cpus = rmt_mach.InstancesOf('Win32_Processor')
for cpu in cpus:
    print cpu.Name, cpu.CurrentClockSpeed, cpu.Description, cpu.L2CacheSize

For my machine, this returns
    Intel Pentium III processor 450 x86 Family 6 Model 7 Stepping 3 512

HTH
Roger Upole

"Gordon Williams" <g_will at cyberus.ca> wrote in message
news:8q807q$2gn8$1 at news2.ottawa.cyberus.ca...
> I would like to know how I can find system information using Python under
> windows.  I would like to know what CPU, video card, sound card etc. are
> being used on a particular machine.
>
> Thanks,
>
> Gordon Williams
>
>





More information about the Python-list mailing list