I have all my .py files inside a folder script and all my IPython-notebooks under a folder named Notebook.
There are multiple cross dependencies for each notebook file on one or more files on script.
Having sys.path.append
on top of every notebook seems cumbersome and I am hoping there is a way to add a default lookup path just like we add PYTHONPATH
to .bash_profile
.
Now I do the following:
import sys
sys.path.append("<path where DeriveFinalResultSet.py exists>)
import DeriveFinalResultSet as drs
I wish to have a setting where I can do the below:
import DeriveFinalResultSet as drs
ipython
on the given script... – Cyclostomejupiter-notebook
from console and it seems to be doing the trick. I am just posting the answer below. If you could, can you verify if it is right? – Bevel