0 votes
1 view
in Data Science by (4.7k points)

I am working on Jupyter QtConsol. I started with the below code:

from myFuncs import func1

I when to myFun.py file and added a new function called func2, then tried this:

from myFuncs import func2

Even after adding I count see it, myFuncs is been cached. I read about the reloading concept but it didn't work in my scenario. I even tried cherry-picked functions and auto-reloading, nothing worked. Can we try restarting kernel?

when I use ipython within Spyder it works fine. It is more interesting while changing files. The only thing lagging is speed.

1 Answer

0 votes
by (9.8k points)

You can use the below code to achieve your desired results.

import importlib

import sys


from myFuncs import func2

Learn Python for Data Science Course to improve your technical knowledge. 

Welcome to Intellipaat Community. Get your technical queries answered by top developers !