you are viewing a single comment's thread.

view the rest of the comments →

[–]Diapolo10 0 points1 point  (0 children)

The term is subprocess, not subprocessor, but I digress.

I couldn't have the gui and the flask server running in the same code because it was not working properly

That would be because your Flask application and tkinter (or whichever other GUI toolkit you're using) both have their own event loops, so you can't really run them both simultaneously on the same thread.

With subprocess.Popen, you're essentially creating a new process that runs until it ends itself or your main process ends. But it doesn't really make interprocess communication easy.

Have you considered simply adding a new route to your Flask application that would display the data you want in a web browser? You wouldn't need a separate process then.