I launch IPython from the main folder /project
. Now if I make changes in the file /project/tests/some_module.py
, the changes fail to be autoreloade
If all you need is to reload a changed file in Python just do the following:
from main import some_module
....
reload(some_module)
But if your reload purposes are really eager, you can do the following (taken from this question):
%load_ext autoreload
%autoreload 2
The previous code will reload all changed modules every time before executing a new line.
NOTE: You can also check dreload which does a recursive reload of a module, and %run which allows you to run any python script and load all of its data directly into the interactive namespace.
Hope it helps,