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

Reply via email to