How to force an automatic reload of the library from inside IPython notebook
Question: I'm just learning IPython Notebook, using a pre-existing Python library I've
written. At the beginning of my notebook, I'm importing it in the normal way.

However, I'm still modifying this library. I notice that changes I'm making to
it don't seem to be reflected, even when I reload the notebook in the browser.

How can I force a reload of the library from inside IPython notebook?


Answer: Use the magic
[`autoreload`](http://ipython.readthedocs.org/en/stable/config/extensions/autoreload.html?#module-
IPython.extensions.autoreload) to get your module refreshed automatically as
you edit it.

For instance, if you develop a module called `mylibrary`:

    
    
    %load_ext autoreload
    %autoreload 1
    %aiimport mylibrary
    

will automatically reload the module `mylibrary`.

You can ask to get all modules automatically reloaded with:

    
    
    %autoreload 2
    

