[IPython-User] Getting deepreload to work by default

David Prager Branner brannerchinese@gmail....
Tue Aug 27 04:13:20 CDT 2013


The API currently describes the use of deepreload as follows:

> import __builtin__, deepreload
>
> __builtin__.reload = deepreload.reload
>
> (
http://ipython.org/ipython-doc/dev/api/generated/IPython.lib.deepreload.html
)

However, I get an error on the first line:

---------------------------------------------------------------------------
> ImportError                               Traceback (most recent call last)
> <ipython-input-5-8cdf8b90bab6> in <module>()
> ----> 1 import __builtin__, deepreload
>
> ImportError: No module named '__builtin__'
>

and __builtin__ itself (which loads automatically when Ipython is started)
is said to have no attribute 'reload'. Similarly, trying to import
deepreload alone raises an ImportError.

I can, I think, get the module to load using

import
> IPython
> __builtin__.reload = IPython.lib.deepreload.reload
>

instead. But I don't find that deep reloading is in fact taking place
automatically, even though

%load_ext autoreload
%autoreload 2

is in my ~/.ipythonrc/profile_default/startup/ipython3_startup.ipy. Small
changes to a class are still not showing up unless I manually run
IPython.lib.deepreload.reload().

(IPython 1.0.0, Python 3.3.1)

- dpb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130827/29b1dff1/attachment.html 


More information about the IPython-User mailing list