This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py')
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, kxroberto
Priority: normal Keywords:

Created on 2006-02-02 11:47 by kxroberto, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg60869 - (view) Author: kxroberto (kxroberto) Date: 2006-02-02 11:47
WinXP/NTFS/py2.4.2:

>>> glob.glob(u'\u043a\u043a\u043a/x.py')
[u'\u043a\u043a\u043a/x.py']
>>> execfile(u'\u043a\u043a\u043a/x.py')
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
IOError: [Errno 2] No such file or directory: '???/x.py'

shouldn't it work even when the base filename is unicode:

>>> glob.glob(u'\u043a\u043a\u043a.py')
[u'\u043a\u043a\u043a.py']
>>> execfile(u'\u043a\u043a\u043a.py')
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
IOError: [Errno 2] No such file or directory: '???.py'
>>> 

Robert
msg83313 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-03-08 16:48
It works with python 3.0.
Of course you have to replace execfile with

>>> s = '\u043a\u043a\u043a.py'
>>> exec(compile(open(s).read(), s, 'exec'))
History
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 42861
2009-03-08 16:48:52amaury.forgeotdarcsetstatus: open -> closed
title: Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') -> Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py')
nosy: + amaury.forgeotdarc

messages: + msg83313

resolution: out of date
2006-02-02 11:47:56kxrobertocreate