0

Keep Constant Variables between Python and JavaScript

I need a way to have python and JavaScript code interact so that A) after a JavaScript input, it runs python code. And B) a variable in the JavaScript code is recognized in python, and vise versa. Thanks

22nd Sep 2018, 1:19 AM
Carson
Carson - avatar
2 Respostas
+ 1
I would do it with php or django and xml requests. shell_exec() executes shell commands but also returns the content that the python program outputs. For nodejs https://github.com/sindresorhus/execa#readme Send the variable with xml request and pass it in the command line argument when executing python program.
22nd Sep 2018, 1:33 AM
Toni Isotalo
Toni Isotalo - avatar
0
How do I set this all up ?
22nd Sep 2018, 6:05 PM
Carson
Carson - avatar