[Python-3000] Displaying strings containing unicode escapes at the interactive prompt

Oleg Broytmann phd at phd.pp.ru
Wed Apr 16 14:45:29 CEST 2008


On Wed, Apr 16, 2008 at 10:11:13PM +1000, Nick Coghlan wrote:
> atsuo ishimoto wrote:
> > IOError: [Errno 2] No such file or directory: '\u65e5\u672c\u8a9e'
> 
> This is starting to seem to me more like something to be addressed 
> through sys.displayhook/excepthook at the interactive interpreter level 

   The problem manifests itself in scripts, too:

Traceback (most recent call last):
  File "./ttt.py", line 4, in <module>
    open("тест") # filename is in koi8-r encoding
IOError: [Errno 2] No such file or directory: '\xd4\xc5\xd3\xd4'

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-3000 mailing list