python - autoupdate module in IPython / jupyter notebook -


i wrote own module following structure:

mymodule/ ├── __init__.py ├── part1.py ├── part2.py ├── part3.py └── part4.py 

to test module using ipython and/or jupyter notebook (formerly ipython notebook). usual module import like

import mymodule 

let's edit code in part2.py , want use updated version of module. first thought re-importing module import mymodule job, not. reload module have close ipython's shell or restart jupyter's kernel , start again importing mymodule.

however, reffering docs, ipython provides auto-update function called autoreload provides different modes , activated follows:

%load_ext autoreload %autoreload 1 %aimport mymodule 

using both of snippets, importing mymodule that:

%load_ext autoreload %autoreload 1 %aimport mymodule  import mymodule  # let's module here 

however, activated autoreload 1 or autoreload 2 neither ipython nor jupyter doing expect them , still have quit ipython's shell or restart jupyter's kernel in order use edited code of part2.py part of mymodule.

what doing wrong? seems did not point how should work.

change %autoreload 1 %autoreload 2 dashesy said, old version or bug.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -