[python-win32] [Python-Help] Need help

Tim Golden tim.golden at viacom-outdoor.co.uk
Tue Mar 16 11:10:05 EST 2004


MD Alam> I'm working on python and trying to make a software witch will scan
MD Alam>users pc and get all hardware information. I have get all these
MD Alam>information using windows registry.But One thing I cudn't find is
MD Alam>get windows memory from registry.I mean how much memory have in
MD Alam>the system.Can anybody help me to get it.I don know which registry I
MD Alam>have to open and where I can get  the right path to get memory info.

[Obligatory plug for... WMI!]

You can do this in WMI. Something like this:

<code>

import wmi
c = wmi.WMI ()
for i in c.Win32_ComputerSystem ():
  print i.Caption, "has", i.TotalPhysicalMemory, "bytes"

</code>

Get it from http://tgolden.sc.sabren.com/python/wmi.html

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. 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-win32 mailing list