[issue5524] execfile() removed from Python3

2009-03-31 Thread Jeremy Hylton
Jeremy Hylton added the comment: It doesn't seem helpful to leave this issue open, particularly since the title suggest there's a problem with execfile being removed and that's not going to change. -- nosy: +jhylton status: open -> closed ___ Python

[issue5524] execfile() removed from Python3

2009-03-21 Thread STINNER Victor
STINNER Victor added the comment: >> Ok... but there is the newline issue: (self quote) >> "exec() doesn't support newline different than \n, >> see issue #4628". > So that issue should get fixed, then. Ok, I will work in the other other issue. If #4628 is fixed, this issue becomes meaningl

[issue5524] execfile() removed from Python3

2009-03-20 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Ok... but there is the newline issue: (self quote) "exec() doesn't support > newline different than \n, see issue #4628". So that issue should get fixed, then. > And open_python() can be used for other usages than execfile() ;-) > > Note: tokenize.open_py

[issue5524] execfile() removed from Python3

2009-03-20 Thread STINNER Victor
STINNER Victor added the comment: martin> There is a much simpler solution to the problem: martin> use exec(open(fn,"rb").read()) Ok... but there is the newline issue: (self quote) "exec() doesn't support newline different than \n, see issue #4628". And open_python() can be used for other us

[issue5524] execfile() removed from Python3

2009-03-19 Thread Martin v. Löwis
Martin v. Löwis added the comment: -1. There is a much simpler solution to the problem: use exec(open(fn, "rb").read()) -- nosy: +loewis ___ Python tracker ___ __

[issue5524] execfile() removed from Python3

2009-03-19 Thread STINNER Victor
New submission from STINNER Victor : In "What’s New In Python 3.0" document, I can read "Removed execfile(). Instead of execfile(fn) use exec(open(fn).read())". The new syntax has two problems: - if the file is not encoding in UTF-8, we get an unicode error. Eg. see issue #4282 - exec() does