I am using a jupyter lab notebook and trying to modify code, reload it within the jupyter notebook and use the modified code without reloading the kernel. I am using python 3.5.5 and am running code like this:
(in file test.py)
def myTest():
print('hello')
(in jupyter)
from test import myTest
import importlib
importlib.reload(test)
myTest()
When I run the code in my jupyter lab notebook I get a NameError that name 'test' is not defined. From searching on stackoverflow the only references I find to this error is problems using older version of python. But the way I am using importlib.reload() seems to be correct.
test?myTestappears to be definedfrom test import myTest.