[python-win32] timePlanning/logging app

2012-01-04 Thread Jacob Kruger
Here's a page related to the first sort of version of a time/project planning app have just finished off using python, wxPython, LBC, sqlite3 etc.: http://www.blindza.co.za/work/timePlanning.htm Here's the first paragraph off that page, to give you an idea of what it is targeting: "This small pi

[python-win32] WMI module - Properties Order

2012-01-04 Thread pierre baral
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: c = wmi.WMI() wql = "Select Name, Description, Caption From Win32_LogicalDisk" logical_disks = c.query(wql) ... instance of Win32_LogicalDisk

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

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: > > 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 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 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(