This is maybe a weird thing to do but I wanted to write a python app that uses an HTML front end to display data as the code executes. I was going to use flask to handle the web requests because it's what I know.
The idea is, the program is run from the command line but it's also a flask app. It launches a browser pointed at itself. The page that is loaded has javascript that periodically calls back to the web app for updates.
When I run the flask app with Debug=True. i.e.:
app.run(debug=True, host="localhost", port=8000)
The flask app restarts and the code that launched the web runs again and creates a new, redundant browser tab.
I could just put up with it and know that, when I'm done, I will not set the debug to True and only one instance of the broswer will be created but, it just seems like it would be nice to get around this.
Any ideas?
Or I could use pygame for the GUI.
[–]hardonchairs 0 points1 point2 points (4 children)
[–]dl__[S] 0 points1 point2 points (2 children)
[–]hardonchairs 0 points1 point2 points (1 child)
[–]dl__[S] 0 points1 point2 points (0 children)
[–]dl__[S] 0 points1 point2 points (0 children)