2 ms·
This is full of weird examples. I take it it’s more useful for emulations than for use in any production environment. > Calling methods on a JavaScript class
by LeftHandPath 7y ago
This is full of weird examples. I take it it’s more useful for emulations than for use in any production environment.
> Calling methods on a JavaScript class from Python code...
This feels like an incomplete solution to a nonexistent problem.
JavaScript and Python can communicate however you want them to over a Unix or IP socket, which will ALWAYS be much lighter weight than running layered interpreters this way. All you need to do is determine a communication protocol and implement a basic API. Send a command, wait, and listen for a result.
> Wrapping a JavaScript function in a Python function...
There are other ways to skin that cat. And most of them are better.