0

I want to load the content of a notebook as a module in ipython like we do in normal cases. We add a file with the name __init__.py in the directory of the module of interest and that enable us to load it from another python file by doing from fileName import *. Now I can't get it work with ipython. Can anyone help me to figure this out ?

Many thanks.

deltascience
  • 3,174
  • 5
  • 37
  • 67
  • possible duplicate of [How can I import from another ipython-notebook?](http://stackoverflow.com/questions/19564625/how-can-i-import-from-another-ipython-notebook) – Ian Mar 11 '15 at 16:00

1 Answers1

1

The notebook format is not Python code. You can convert it using nbconvert, e.g.:

ipython nbconvert --to python notebook.ipynb
Peter Wood
  • 22,682
  • 5
  • 57
  • 94