[IPython-User] Magic reset except user namespace given to start_ipython

Lev Givon lev@columbia....
Tue Sep 10 13:13:33 CDT 2013

Received from Hugo Gagnon on Tue, Sep 10, 2013 at 02:08:41PM EDT:
> Hello,
> I'm starting ipython from a python script likewise:
> IPython.start_ipython(user_ns=my_ns, config=my_config)
> Once in ipython, is it possible to reset my namespace (using the %reset
> magic) except for whatever is contained in "my_ns"?
> If not, what would be the best way to go about it?
> Thanks,

If the items you want to keep in the namespace are all modules, you can use the
duster extension to automatically reload specific modules after a reset:

Lev Givon

More information about the IPython-User mailing list