Message78170
In 2to3, execfile(file, globals, locals) is translated to
exec(open(file).read(), globals, locals)
But that's not correct, as the actual file from the executed code gets
wrong with that.
The correct thing would be:
exec(compile(open(file).read(), file, 'exec'), globals, locals)
So that the name of the file remains correct in the module that's being run. |
|
Date |
User |
Action |
Args |
2008-12-22 11:24:58 | fabioz | set | recipients:
+ fabioz |
2008-12-22 11:24:58 | fabioz | set | messageid: <1229945098.56.0.809169461336.issue4717@psf.upfronthosting.co.za> |
2008-12-22 11:24:57 | fabioz | link | issue4717 messages |
2008-12-22 11:24:57 | fabioz | create | |
|