I'm trying to code my bot in Python, then, since it can run synchronously with the browser. How can I pass the JavaScript variables to a client-side Python program?...
You can pass the JavaScript variables only with query string.
I create the server in CherryPy (CherryPy is an object-oriented web application framework using the Python ) and the client function with file HTML.
Repeat: The data can be passed only by query string because the Server works statically and the Client works dynamically.
This is a stupid sentence but so function a general Client/Server.
The server receive a call or message one times and offers the service and response.
I also can wrong....This is a my opinion.
Exists Mako Templates where you can include the pages HTML (helpful for build the structure of the site) or pass variable from Server to Client.
I not know nothing programs or languages that you can pass the JavaScript variable to Server (and I try with Mako Templates but not function).