I am developing a Python package that is supposed to run in jupyter lab. I need to retrieve some information from a Javascript library that runs within a Ipython.display(HTML(…)). I have seen examples on the internet of people using IPython within Javascript to do this sort of communication. For example, I should be able to do something like this and execute any code from the kernel:
import IPython.display as ipd
ipd.display(ipd.Javascript(“”“IPython.notebook.kernel.execute(‘print(“Hello World!”)’);”“”))
However, I’m getting a ‘IPython is not defined.’ issue. I have scoured the internet for a solution but I could not find anything that worked. Does anybody know some workaround to fix this issue? Thanks.
N.B. There is a solved thread with a very similar title but it is not the same issue. My problem has nothing to do with matplotlib.