Python Module for Determining CPU Freq. and Memory?
Tim Golden
tim.golden at viacom-outdoor.co.uk
Thu Apr 6 03:32:14 EDT 2006
[efrat]
| I'd like to determine at runtime the computer's CPU frequency and
| memory.
|
| (Please note: I'm interested in hardware stuff, like how much
| memory the
| machine has; not how much free memory is available.)
I don't know if there's a cross-platform solution for this.
For Windows, you could use WMI. Something like this:
<code>
import wmi
c = wmi.WMI ()
for i in c.Win32_ComputerSystem ():
print i.TotalPhysicalMemory
for i in c.Win32_Processor ():
print i.DeviceID, i.MaxClockSpeed, "MHz"
</code>
You can get the wmi module from:
http://timgolden.me.uk/python/wmi.html
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-list
mailing list