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

Just van Rossum just@letterror.com
Mon, 8 Mar 1999 16:24:29 +0100


At 3:11 PM +0100 3/8/99, Jack Jansen wrote:
>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?

It's possible, but wouldn't help much, since other modules that depend on
the one being saved may still use old code.

>An alternative would be to do a reload of all modules when you hit
>run,

Ouch! I suppose you rather mean all modules belonging to a project? I
intend to add a project manager at some point, so that may be possible.

>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.

That doesn't fix the problem of non-changed modules which *do* need a reload...

Just