Thursday, April 21, 2016

ipyhon

to autoreload in ipython type

%load_ext autoreload
%autoreload 2


to make it permanent

create a profile
ipython profile create
  
add in
~/.ipython/profile_default/ipython_config.py (win)
~/.config/ipython/profile_default/ipython_config.py (linux, old ipython)
 ~/.ipython/profile_default/ipython_config.py (linux, new ipython)


the following lines

c.InteractiveShellApp.exec_lines = []
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.exec_lines.append('%autoreload 2')
c.InteractiveShellApp.exec_lines.append('print("autoreload active")')


source:
http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython/10472712#10472712

No comments:

Post a Comment