Extracting info from OS/hardware

Tim Golden tim.golden at viacom-outdoor.co.uk
Tue Mar 16 06:29:00 EST 2004


Josiah Carlson <jcarlson at nospam.uci.edu> wrote in message news:<c33rct$n11$1 at news.service.uci.edu>...
> > In Linux, you can get a lot of information on hardware and status by examining 
> > files in the /proc directory. For example, from doing cat /proc/cpuinfo on my 
> > system:
> [snip proc info]
> 
> [snip Windows env vars examples]
>
> There is likely a better and faster way for both by using pywin32 
> (current name for win32 extensions).
> 

For this kind of thing on Win32, WMI is very useful. 
Check out:

http://tgolden.sc.sabren.com/python/wmi.html

In theory, something equivalent should be available for Linux:
WMI is based on the DMTF / WBEM industry standard. However
as it stands this module is completely windows-centric, 
relying as it does on Microsoft's implementation of the 
standard and the pywin32 libraries. 
Not to say someone couldn't merge it with some equivalent 
Linux implementation if there were one and someone had the time...

TJG



More information about the Python-list mailing list