Tal Einat <talei...@users.sourceforge.net> added the comment: Why doesn't execfile() set __file__? I would be surprised if this is due to an oversight by the Python devs. In both execfile and IDLE's "Run Module" I can't think of a reason not to set __file__, but perhaps this was intentional? Googling a bit hasn't brought up much.
I am currently of the opinion that both IDLE and execfile() should set __file__ (with execfile() perhaps requiring more thinking about edge-cases, since it can be passes locals and globals dictionaries). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8515> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com