I have a foo.py
foo.py
def foo(): print \"test\"
In IPython I use:
In [6]: import foo In [7]: foo.foo() test >
For Python 2.x
reload(foo)
For Python 3.x
import importlib import foo #import the module here, so that it can be reloaded. importlib.reload(foo)