[SciPy-user] iPython: How to reload & run
Fernando Perez
fperez.net at gmail.com
Sun Mar 23 20:36:57 EDT 2008
On Sun, Mar 23, 2008 at 5:29 PM, Allen Fowler <allen.fowler at yahoo.com> wrote:
> Hello,
>
> New iPython user here....
>
> Typing %run only reloads the actually file... any of my modules are not reloaded even if I've chenged them.
>
> Is there short-cut command to %run a file and forcefully reload any modules that its uses?
No, unfortunately no. I typically just put a few judiciously chosen
reload(foo)
reload(bar)
atop the script itself. You should keep in mind that generically,
reloading is tricky business: it's order-dependent, and what to do
with already in-memory objects when their supporting modules change
isn't clear.
Python still has a way to go before we catch the fabled lisp machines
from the 70's in terms of interactive modifications of live code, I'm
afraid.
Cheers,
f
More information about the SciPy-User
mailing list