I have already seen the tutorial specifically this example: "examples/snippets/javascript_bindings.py", but what I understand is that you pass some functions forth and back between js and python, and I don't know how can I use that to return the value of js function execution.
say for example I have the python function like this, I have bind it to js. when I run this function in js I pass the name of another python function as "function" parameter of exec_py.... then I run the python function inside "eval" and get the return of it as "function_return". the point here, how can I get "function_return" .
def exec_py(function):
function_return = eval(function)
# whatever it will return "null" in js
return function_return
even I make it like this:
def exec_py(function, js_callback):
function_return = eval(function)
js_callback.Call(function_return)
what is the exact js code to get the function_return in syn way.
sorry for the long question, but this part makes me so confused