flashk <fla...@gmail.com> added the comment:

I noticed that calling "exec('\t')" raises a SyntaxError, so maybe this is 
the root of the problem. I manually added a newline character to the end 
of the file contents and it fixes the issue for me:

exec(compile(open('test.py').read()+'\n', 'test.py', 'exec'))

So maybe the 2to3 script should automatically do this in order to be 
compatible with previous execfile behavior? Or is this a problem with 
exec?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7268>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to