wiki:python/ipython

autoreload modules

ipython Doc

In [1]: load_ext autoreload

In [2]: autoreload 2

Load extension at startup

ipython Doc

$ ipython profile create

This will create a file ~/.ipython/profile_default/ipython_config.py. Open this file, add the line

c = get_config()

somewhere at top of the script and search for these lines

#c.InteractiveShellApp.exec_lines = []

and

#c.InteractiveShellApp.extensions = []

Now, uncomment both lines and add this into the brackets like this:

c.InteractiveShellApp.exec_lines = ['autoreload 2']
c.InteractiveShellApp.extensions = ['autoreload']
Last modified 3 months ago Last modified on Mar 14, 2019, 1:17:55 PM