I have a foo.py
def foo():
print \"test\"
In IPython I use:
In [6]: import foo
In [7]: foo.foo()
test
>
IPython3's autoreload feature works just right.
I am using the actual example from the webpage. First load the 'autoreload' feature.
In []: %load_ext autoreload
In []: %autoreload 2
Then import the module you want to test:
In []: import foo
In []: foo.some_function()
Out[]: 42
Open foo.py in an editor and change some_function to return 43
In []: foo.some_function()
Out[]: 43
It also works if you import the function directly.
In []: from foo import some_function
In []: some_function()
Out[]: 42
Make change in some_function to return 43.
In []: some_function()
Out[]: 43