Python: getting an object's “attribute/method/property” either as a parameter to a method or as a property

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
задан S.Lott 18 October 2010 в 14:22
поделиться