Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?