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 obj in objs:
> props = [getattr(obj, p) for p in obj.properties]
> print "%s" % (";" . join ([p for p in props]))
>
> Actually it will print the props list with the obj.properties order
> (not the order
> of my request)
>
> Any tips to keep the order of my request? So It's not possible? ;'(
Not possible. You will have to pass the field ordering from the query
along to the renderer somehow.
--
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32