ledave123 <ledave...@yahoo.fr> added the comment: Here is the patch:
diff -r e8da570d29a8 Lib/idlelib/PyShell.py --- a/Lib/idlelib/PyShell.py Wed Jul 27 21:28:23 2011 +0200 +++ b/Lib/idlelib/PyShell.py Wed Aug 31 20:16:38 2011 +0200 @@ -582,7 +582,9 @@ def execfile(self, filename, source=None): "Execute an existing file" if source is None: - source = open(filename, "r").read() + import tokenize + with tokenize.open(filename) as filein: + source = filein.read() try: code = compile(source, filename, "exec") except (OverflowError, SyntaxError): Sorry for taking such a long time, I was on holidays. ---------- resolution: -> works for me _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12636> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com