[python-win32] WMI module - Properties Order
pierre baral
pierre.baral at gmail.com
Wed Jan 4 23:57:17 CET 2012
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
{
Caption = "D:";
Description = "Disque CD-ROM";
Name = "D:";
};
If I print the object it will begin with Caption as first, then
Description, then Name...
Is there a way to keep the order of the Select request?
I would like iterating the object properties to have Name in first,
Description in second and Caption in third as in request.
Something like:
instance of Win32_LogicalDisk
{
Name = "D:";
Description = "Disque CD-ROM";
Caption = "D:";
};
Is it possible? Any Idea? :)
Thanks for all
Best Regards,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20120104/9f1ccc94/attachment.html>
More information about the python-win32
mailing list