0

Can functions found in other python files call other functions within that same file?

I am making use of jupyter notebook. I am making use of the package "import_ipynb" in order to import my other notebook("othernb.ipynb") which contains several functions that I have defined. I wish to call the function "A" which calls function "B". Both these functions are found within "othernb.ipynb".

However, after importing "othernb.ipynb" and calling upon function "A", I receive a an error message where function "B" is not defined.

Edited How should I import the "othernb.ipynb" so that the functions are able to call other functions found within the file ?

Any help is appreciated.

Hari
  • 1
  • 2
  • 1
    The answer to your question is of course "yes, they can", but I don't think that answer helps you with your problem, so it seems like you have not really asked about what you wanted to know. Please see [ask] and [mcve]. – kaya3 Oct 20 '22 at 03:39
  • I think it's a duplicated question: https://stackoverflow.com/questions/19082397/including-a-notebook-in-another-notebook-in-ipython – Cezar Peixeiro Oct 20 '22 at 03:46
  • I fixed the issue after I restarted my kernel. Thank you @CezarPeixeiro, the link you provided contains links to other methods I can make use of. – Hari Oct 20 '22 at 04:37

0 Answers0