igvteam / igv-notebook

Module for embedding igv.js in an IPython notebook
MIT License
59 stars 13 forks source link

Add explicit import of get_ipython() #4

Closed tmtabor closed 2 years ago

tmtabor commented 2 years ago

As is, the code works if run directly inside a Jupyter notebook. It works because get_ipython() has already been implicitly imported into the top-level namespace. However, if you write Python code that in turn calls igv_notebook, you get an error: "Line 61: NameError: name 'get_ipython' is not defined." This modification explicitly imports get_ipython() so that it works regardless of whether or not igv_nbotebook is run from the top level namespace.

jrobinso commented 2 years ago

Thanks Thorin.