2

In ipython, we could use the following code to enable auto reload feature.

%load_ext autoreload
%autoreload 2

Now I am using ptipython, I could just type them every time using ptipython, but is there anything that could be automatically executed? such as .bashrc for bash shell.

There is a config.py which will be automatically run. But

%load_ext autoreload 

is not python code, so looks like I can't put them here. Any other solutions to avoid type them manually?

Thomas K
  • 39,200
  • 7
  • 84
  • 86
Daniel Wu
  • 5,853
  • 12
  • 42
  • 93
  • IPython has [startup files](http://ipython.readthedocs.io/en/stable/interactive/tutorial.html#startup-files) which it runs on start. Hopefully that will work with ptipython too. – Thomas K Oct 24 '16 at 13:29
  • I tried, but that doesn't help. But good to know how to do it in plain ipython. thanks. – Daniel Wu Oct 25 '16 at 07:53

0 Answers0