Most of the pertinent questions I see answered online revolve around accessing JS variables from parsed pages. I want to go the other way as I have an HTML page which is being printed in python by beautifulsoup. Pretty easy stuff except that the page contains a bunch of dynamic JavaScript (GUI stuff) which I am not sure how to pre-populate on render without things getting messy.
To clarify: The page is being rendered by a python script running on a server. The python script retrieves a bunch of market data which it slices/dices and then is supposed to populate various JS variables in my HTML page. Again the static HTML is fairly straightforward and I've done that before. But populating the JS variables and arrays could get tricky. FYI - this is a single page and thus it's not worth setting up Flask or Django.
Finally, I wonder if it may just be easier to skip beautifulsoup and simply parse a static HTML file and pre-populate placeholder strings.
Thanks for any pointers, insights, or even better: examples ;-)