examples
examples copied to clipboard
Possible example of how to import code from other notebook
Hello,
Thank you very much for your work, enthusiasm and effort! Could you please add an example, how it is possible to import an object from another Jupyter Notebook? If it is possible at all. I tried:
from OtherNotebook import MyObject._
But from is not a valid keyword, and I can't find any other possible keyword, that can do this trick.
Thanks a lot in advance!
Lori
@gneusch Importing a notebook from another one isn't possible at the moment. Ammonite, that almond relies on, allows importing other scripts, so that you can import Ammonite scripts (*.sc
files) from notebooks. We would need to have Ammonite understand *.ipynb
files too, in order to allow importing notebooks. It's not supported for now.
Maybe this could be added directly in Ammonite, or we could have Ammonite accept some kind of hooks, so that other formats could be supported, and almond could add the right hooks for *.ipynb
files.