How to get Windows system information?

Paul Watson pwatson at redlinepy.com
Fri Jan 13 21:54:52 CET 2006


Martin P. Hellwig wrote:
> dpickles at pacbell.net wrote:
> 
>> Does anybody know how to get the:
>>
>>      Free hard disk space
>>      Amount of CPU load
>>      and Amount of RAM used
>>
>> on windows? I am making an artificial intelligence program that has
>> "moods" based on how much stress the system is under, based on these
>> parameters. I think it could possibly be done via COM. I am not looking
>> for a cross-platform solution- just something that will work on
>> Windows. Thank you for your help!
>>
> 
> Have a look at WMI* , it's specifically designed to getthat kind of 
> stuff, there is also a python layer for WMI**.
> 
> * http://msdn.microsoft.com/library/en-us/wmisdk/wmi/wmi_reference.asp
> ** http://tgolden.sc.sabren.com/python/wmi.html
> 
> hth

WMI sounds like the right way to go.  I recently had to whack a little 
WHS because I could find no Python interface without downloading 
additional modules.  Do you think Tim Golden would submit it for 
inclusion with the standard Python build?  If so, would that require 
pywin32 to be in the build or could Tim do this through ctypes?



More information about the Python-list mailing list