How can I import from another ipython-notebook?

When you start ipython use the –script flag: For example

ipython notebook --script

Then whenever you save your notebook “common_func.ipnb” it will also create a file entitled “common_func.py.” You can import functions from that by using

from common_func import func_a

If you change the common_func notebook, you may need to use

reload()

Leave a Comment