Tal Einat <talei...@users.sourceforge.net> added the comment: I believe IDLE runs modules via execfile(), so I would expect the behavior to be similar, and execfile() does not set __file__. Doing "Run Module" is also IMO equivalent to doing execfile(), so this behavior retains consistency.
However, I would expect __file__ to be set when running IDLE -r <script>, but I get "name '__file__' is not defined" (with Python 2.6.2). This is inconsistent and should be fixed. ---------- nosy: +taleinat _______________________________________ 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