[issue6321] Reload Python modules when running programs
samwyse samw...@gmail.com added the comment: [issue5847] fixed in 2.7/3.1 -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6321] Reload Python modules when running programs
Changes by Ned Deily n...@acm.org: -- resolution: out of date - duplicate stage: - committed/rejected superseder: - IDLE/Win Installer: drop -n switch for 2.7/3.1; install 3.1 as idle3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6321] Reload Python modules when running programs
Roger Serwy roger.se...@gmail.com added the comment: Should this issue be closed? It is related to #4691. -- nosy: +serwy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6321] Reload Python modules when running programs
Cherniavsky Beni c...@users.sf.net added the comment: When you run a program using F5 in IDLE, it completely restarts the underlying interpreter! If you meant a different way of running, please elaborate. (Exception: it uses the same interpreter if you're running idle -n; this commonly happens on Windows if you rightclick-Edit with IDLE... a .py file - just don't use that.) -- nosy: +cben ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6321] Reload Python modules when running programs
samwyse samw...@gmail.com added the comment: As it happens, I do use Windows and almost exclusively start IDLE via right-clicks on .py files. I've never seen the behavior you describe documented anywhere. On Aug 15, 2010, at 1:37 PM, Cherniavsky Beni rep...@bugs.python.org wrote: Cherniavsky Beni c...@users.sf.net added the comment: When you run a program using F5 in IDLE, it completely restarts the underlying interpreter! If you meant a different way of running, please elaborate. (Exception: it uses the same interpreter if you're running idle -n; this commonly happens on Windows if you rightclick-Edit with IDLE... a .py file - just don't use that.) -- nosy: +cben ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6321 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6321] Reload Python modules when running programs
Cherniavsky Beni c...@users.sf.net added the comment: As it happens, I do use Windows and almost exclusively start IDLE via right-clicks on .py files. I've never seen the behavior you describe documented anywhere. You're right, it wasn't. [IDLE does show a No Subprocess line in the IDLE shell when you launch it this way. Unfortunately, the significance of this (and of the absence of == Restart == lines on F5) wouldn't be obvious unless you followed IDLE development around 2.3... :-(] If you're using Python up to 2.6/3.0, please fall back to starting IDLE from the Start menu → Programs → Python X.Y → IDLE, then use File→Open to open files. Or upgrade to Python 2.7/3.1, where right click → Edit with IDLE was fixed [issue5847] to open IDLE in the fully-functional mode. Note however, that once you have an open IDLE, still want to use File→Open or you'll get *2* IDLEs running at once, each with its own shell. In both cases you'll notice IDLE will *completely* restart the underlying Python each time you press F5. This eliminates any stale-module problems, but kills all variables and state you had; this might require a change of habits but in my experience it's well worth it. [P.S. If you absolutely must have module reloading without killing the whole state, and you're willing to debug occasional issues, take a look at http://www.cherrypy.org/attachment/wiki/AutoReload/autoreload.py and possibly http://www.codexon.com/posts/a-better-python-reload] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6321] Reload Python modules when running programs
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- assignee: - kbk nosy: +kbk versions: +Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6321] Reload Python modules when running programs
New submission from samwyse samw...@gmail.com: Every time IDLE is asked to run a program, it doesn't ensure that the modules referenced by the program are completely loaded. This can cause problems if one of those modules is also being edited, because once it is loaded, any subsequent changes are not compiled and re-loaded. PyUnit faced a similar problem and solved it with a custom importer (http://pyunit.sourceforge.net/notes/reloading.html). Ideally, the custom importer would be used in two places: The obvious choice is when a program is run, unloading when it returns. The less obvious is when the Python Shell window is opened, since import statements can be run from there as well. Closing that window should cause all such imports to be unloaded. Of course, care must be taken to insure that all run commands are properly nested within the lifetime of a shell window. -- components: IDLE messages: 89593 nosy: samwyse severity: normal status: open title: Reload Python modules when running programs type: feature request versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com