Friends, I really need your help. Using Python and JS in Jupyter ran into a very big (for me) problem:
How to save the result of JS into a variable, and not display it in Out [...]
Code example:
from IPython.display import Javascript from IPython.display import display from IPython.display import HTML js_test = """ var a = 2; var b= 2; var c = a+b; element.text(c); """ Res=Javascript(js_test) I need to convert Res to a variable and get "4". If Res is simply assigned to another variable, then I get "IPython.core.display.Javascript"
I would be very grateful for the help. Right very, very!