Breaking code into multiple files on Windows
In Jupyter on Windows, I create a Notebook "testa.ipynb" as follows:
def f():
return 3
I then create another Notebook "testb.ipynb" as follows:
import testa
testa.f()
Running this produces the error "No module named 'testa'". The files are in the same directory, which is the default "C:\Users\<user>".
How can I break my code into multiple files like this?
Try to make
testa
live somewhere where thePYTHONPATH
(or sage) finds it. Then check this in the sage ipyton console.