[Tutor] about reload

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Fri Dec 29 23:06:57 CET 2006



On Fri, 29 Dec 2006, linda.s wrote:

> I read something about reload of modules.
> #test.py
> from ABC import M # M is an attribute of Module ABC
>
> if I change module ABC, I need import ABC and reload ABC before "from 
> ABC import M" work. in IDLE, I just click F5 and run the code, it works 
> and does not need type anything like "Import ABC", "Reload(ABC)". Why 
> the book say the two steps are needed?

reload() is necessary if we don't re-run everything from scratch.

When you're pressing F5 in IDLE, IDLE restarts the whole program, so in 
that particular case, you don't need to worry about reload() at all.


More information about the Tutor mailing list