Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') #42861

Closed
kxroberto mannequin opened this issue Feb 2, 2006 · 2 comments
Closed

Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') #42861

kxroberto mannequin opened this issue Feb 2, 2006 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@kxroberto
Copy link
Mannequin

kxroberto mannequin commented Feb 2, 2006

BPO 1422398
Nosy @amauryfa

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2009-03-08.16:48:52.419>
created_at = <Date 2006-02-02.11:47:56.000>
labels = ['interpreter-core']
title = "Unicode IOError: execfile(u'\\u043a\\u043a\\u043a/x.py')"
updated_at = <Date 2009-03-08.16:48:52.371>
user = 'https://bugs.python.org/kxroberto'

bugs.python.org fields:

activity = <Date 2009-03-08.16:48:52.371>
actor = 'amaury.forgeotdarc'
assignee = 'none'
closed = True
closed_date = <Date 2009-03-08.16:48:52.419>
closer = 'amaury.forgeotdarc'
components = ['Interpreter Core']
creation = <Date 2006-02-02.11:47:56.000>
creator = 'kxroberto'
dependencies = []
files = []
hgrepos = []
issue_num = 1422398
keywords = []
message_count = 2.0
messages = ['60869', '83313']
nosy_count = 2.0
nosy_names = ['amaury.forgeotdarc', 'kxroberto']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1422398'
versions = ['Python 2.4']

@kxroberto
Copy link
Mannequin Author

kxroberto mannequin commented Feb 2, 2006

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

@kxroberto kxroberto mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Feb 2, 2006
@amauryfa
Copy link
Member

amauryfa commented Mar 8, 2009

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'))

@amauryfa amauryfa closed this as completed Mar 8, 2009
@amauryfa amauryfa changed the title Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') Mar 8, 2009
@amauryfa amauryfa closed this as completed Mar 8, 2009
@amauryfa amauryfa changed the title Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py') Mar 8, 2009
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

No branches or pull requests

1 participant