[IPython-user] Module reload in interactive mode
Mon Feb 9 04:36:13 CST 2009
On Mon, Feb 9, 2009 at 8:47 AM, Ignazio Di Napoli <firstname.lastname@example.org> wrote:
> Hi all.
> I use IPython for debugging my scripts and I have a problem with it.
> If I run some code using %run and this code imports a module, subsequent runs do not reload the module and so the changes I could have made.
> Using reload or dreload do not help, at least how I'm using them (if the script contains "import module", I tried using reload(module) and dreload(module)).
> The only way I found is closing and reopening IPython. Neither %reset helps. Is there some kind of tweak I can use? Maybe using sys.modules?
I'm not certain but you could try using run -i (so that the imported
module is in the interactive space) and then perhaps reload and
dreload should work (they do for me).
More information about the IPython-user