1

In the WMI module (yeah, my boss wants me to program in Windows — but at least it’s not in COBOL), it seems that you can access a WMI value either by passing it’s name as a string parameter of a method,

blabla=wmithingy().getvalue('nameOfValue')

or as a property/method:

blabla=wmithingy().nameOfValue()

Am I dreaming, smoking bad weed, or can it effectively be done (and how)?

1
  • Do you have the source of wmithingy() to look at and see how it's done? Commented Oct 18, 2010 at 13:25

1 Answer 1

2

Either the getvalue() method uses getattr(), or the __getattr__() method defers to the getvalue() method.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.