[Pythonmac-SIG] MacPython IDE doesn't reload edited files

Jack Jansen Jack.Jansen@cwi.nl
Mon, 08 Mar 1999 15:11:25 +0100


Recently, Just van Rossum <just@letterror.com> said:
> In general, running a module is the same as reloading a module. So there
> are three options:
> - open the module and choose "Run"
> - select the module in the module browser and choose "Reload"
> - use the reload() function.

Just,
when you save a module, would it be possible to look in sys.modules to 
see whether a module with that name is already loaded and, if so,
present the user with a dialog "Do you want to reload the module?"? Or 
would that be too cumbersome?

An alternative would be to do a reload of all modules when you hit
run, or even keep a complete administration (a list of tuples
(modulename, filename, modificationtime), sorted by order of import),
and quickly run through this when the user "run"s reloading everything 
from the first changed module.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@cwi.nl      | ++++ if you agree copy these lines to your sig ++++
http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm