[python-win32] using tim golden's wmi.py
Tim Golden
tim.golden at viacom-outdoor.co.uk
Thu Oct 7 17:38:06 CEST 2004
[ashok.nagaraj at colorado.edu]
| Has anyone used the wmi.py module to access device drivers
| info.I want to make sure that it works before i try use it.
| I am trying to use it to get MSNdis class info.
The simplest answer is: this is Python -- just try it.
More specifically, since I have no knowledge at all of
MSNdis classes, and a quick Google doesn't enlighten me
tons, can you give an example of VBS-type code which does
what you want?
The WMI module simply wraps Win32 COM functionality, so
anything should be possible. The sort of things which aren't
so obvious / so well covered by my list of examples tend
to be things which require slightly unusual use of namespaces,
specific monikers etc.
(Information from http://www.ndis.com/faq/QA01050301/default.htm)
[... pause for experimentation ...]
OK. Seems to work. Try this:
<code>
import wmi
c = wmi.WMI (namespace="WMI")
print [i for i in c.classes if i.startswith ("MSNdis")]
for i in c.MSNdis_LinkSpeed (): # whatever that is (!)
print i
</code>
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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