[Tutor] hardware specs from python on OSX
greenbergj at wit.edu
Wed Nov 8 05:29:23 CET 2006
Yi Qiang wrote:
> I am trying to get some basic information about the computer's
> hardware specs in OSX in python. In linux I can get most of what I
> need from the /proc filesystem. Is there an equivalent in OSX? If
> not, where else can I get information about the system from? I need
> CPU model, # of cpus, cpu speed, physical memory, etc.
Somewhat unsurprisingly, a quick google for "python system information
osx" turned up this recipe in the ActiveState cookbook:
which should help.
Looking into the sysctl command might also be useful.
HTH, keep in mind that I'm *NOT* a Mac guy, at all.
More information about the Tutor