Spurious character in IOError exception

loial jldunn2000 at gmail.com
Thu Apr 28 04:53:52 EDT 2011


When I correctly trap an IOError a spurious u' appears in the file
path in the exception message :
The path used in the code is correct i.e. /home/myfile
But the error message says :
[Errno 2] No such file or directory: u'/home/myfile'
I am simply doing
 except IOError, e:
 print str(e)
Any ideas where the 'u is coming from?
This is python 2.4.1


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /