Re: [python-win32] WMI module - Properties Order

2012-01-04 Thread pierre baral
Thanks a lot Tim, I also thought about that hack! :) I could also parse the wql to put params in a list. (It would also have be nice to have a list of not ordered properties (after the wql parsing). Something like props = [getattr(obj, p) for p in obj.notordered_properties] :-P) c = wmi.WMI(

Re: [python-win32] WMI module - Properties Order

2012-01-04 Thread Tim Roberts
Tim Roberts wrote: > pierre baral wrote: >> In fact, I would like to generate a code that is generic... without >> knowing the name of the properties (so without calling obj.property) ! >> >> Check my example: >> >> c = wmi.WMI() >> wql = "Select Name, Caption, Description From Win32_Blabla" >> obj

Re: [python-win32] WMI module - Properties Order

2012-01-04 Thread Tim Roberts
pierre baral wrote: > > In fact, I would like to generate a code that is generic... without > knowing the name of the properties (so without calling obj.property) ! > > Check my example: > > c = wmi.WMI() > wql = "Select Name, Caption, Description From Win32_Blabla" > objs = c.query(wql) > > for ob

Re: [python-win32] WMI module - Properties Order

2012-01-04 Thread pierre baral
Hello Tim, In fact, I would like to generate a code that is generic... without knowing the name of the properties (so without calling obj.property) ! Check my example: c = wmi.WMI() wql = "Select Name, Caption, Description From Win32_Blabla" objs = c.query(wql) for obj in objs: props = [get

Re: [python-win32] WMI module - Properties Order

2012-01-04 Thread Tim Roberts
pierre baral wrote: > I have a question on the WMI module done by Tim Golden. > Maybe I can find help on this mailing list ;-) > > Let's take a short example to explain what I want: > ... > If I print the object it will begin with Caption as first, then > Description, then Name... How are you curr