I'd like to determine at runtime the computer's CPU frequency and memory.
Is there a module for these types of queries? platform.platform returns
the computer's CPU name and type, but not its frequency; nor does it
report how much memory the computer has. In the python help(), I
searched for moudles cpu, but non were found.
(Please note: I'm interested in hardware stuff, like how much memory the
machine has; not how much free memory is available.)
For looking at memory on windows you might be able to make improvements
to this class I wrote. I was going to add memget() methods for getting
individual items, but it wasn't as useful as I was hoping it would be
in checking my python memory use. For that I need info on individual
tasks, but this might be better for your use.
from ctypes import *
from ctypes.wintypes import DWORD
SIZE_T = c_ulong
_fields_ = [ ("dwLength", DWORD),
("dwAvailVirtualPhys", SIZE_T) ]
result = 
for field_name, field_type in self._fields_:
result.append("%s, %s\n" \
% (field_name, getattr(self, field_name)))
memstat = MemStat()
if __name__ == '__main__':