I have a javascript function that I can call with input and that returns a result. I can integrate this javascript function into an html-document (of course).
Now I would like to call exactly this javascript function from python. I have a python programm and want to call the javascript function with input parameters passed to the JS function by the calling python function. And the JS function shall return some result to python.
This JS function has quite complex functionality and is used in a web project also. I would like to use same functionality in Python.
Does anyone know how to solve this? Python is quite huge so I think I only did not find the required python module up until know. I spent 2 days in searching a possibility.
Thanks!
pyv8 will let you use the V8 JS engine from Python.
If the JavaScript function depends on things that are not core JavaScript (such as DOM) then you will need to find implementations of those.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With