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