[python-win32] Error while listing the Installed Software using wmi module

2008-05-30 Thread siddhartha veedaluru
Hi all, The following code snippet gives the error import wmi c = wmi.WMI() for i in c.Win32_Product(): print i.Name Output --- Windows Installer Clean Up Python 2.5.1 Debugging Tools for Windows Windows Resource Kit Tools Adobe Reader 8.1.2 Java(TM) SE Runtime Environment 6 Java(TM) 6

Re: [python-win32] Error while listing the Installed Software using wmi module

2008-05-30 Thread Tim Golden
siddhartha veedaluru wrote: Hi all, The following code snippet gives the error import wmi c = wmi.WMI() for i in c.Win32_Product(): print i.Name WMI returns the Name as a unicode object. You usually need to encode that one way or another to print it out / save it to a file, etc. Try this: