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:
<code>
import wmi
c = wmi.WMI ()
for i in c.Win32_Product ():
print i.Name.encode (sys.stdout.encoding, "replace")
</code>
TJG
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32