os.popen encoding!

SMALLp pofuk at email.t-com.hr
Wed Feb 18 13:09:24 CET 2009

I'm playing with os.popen function.
a = os.popen("somecmd").read()

If one of the lines contains characters like "è", "æ"or any other it loks 
line this "velja\xe8a 2009" with that "\xe8". It prints fine if i go:

for i in a:
    print i:

How to solve this and where exectly is problem with print or read! Windows 
XP, Python 2.5.4


More information about the Python-list mailing list