[issue8515] idle "Run Module" (F5) does not set __file__ variable

2013-06-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset a958b7f16a7d by Terry Jan Reedy in branch '2.7': Issue #8515: Set __file__ when run file in IDLE. Backport 2c276d0553ff by http://hg.python.org/cpython/rev/a958b7f16a7d -- ___ Python tracker

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2012-04-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks to all. Bruce Frederiksen, you are mentioned in Misc/ACK Tal Einat, if you want to make a patch which will use `execfile` instead of current approach — you are welcome. Please file new issue. -- assignee: -> asvetlov resolution: -> fixed stag

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2012-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2c276d0553ff by Andrew Svetlov in branch 'default': Issue #8515: Set __file__ when run file in IDLE. http://hg.python.org/cpython/rev/2c276d0553ff -- nosy: +python-dev ___ Python tracker

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2012-03-31 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2011-12-08 Thread Roger Serwy
Roger Serwy added the comment: I've encountered this bug several times myself. I applied this patch and it corrects the issue. -- nosy: +serwy versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2010-06-11 Thread Tal Einat
Tal Einat 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

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2010-06-11 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file17632/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2010-06-11 Thread Bruce Frederiksen
Bruce Frederiksen added the comment: No, IDLE compiles the module (with the 'compile' built-in using the 'exec' option) and then does an 'exec' on the code (in PyShell.py). It has several lines of code that it runs before this exec to prepare the environment that the code is run in. It appears

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2010-06-11 Thread Tal Einat
Tal Einat 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

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2010-04-23 Thread Bruce Frederiksen
New submission from Bruce Frederiksen : The python CLI always sets the __file__ variable, whether run as: $ python foobar.py or $ python -m foobar or $ python >>> import foobar # __file__ set in foobar module The idle program sets the __file__ variable properly when you do the import fro