[SciPy-user] iPython: How to reload & run

Allen Fowler allen.fowler at yahoo.com
Tue Mar 25 17:36:03 EDT 2008


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

Hmm..

This being the case.. is there a way to simply do a quick "reset everything, and then run this file"?  

-- Thanks





      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ




More information about the SciPy-User mailing list