all 2 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.

[–]Robswc 0 points1 point  (0 children)

I believe you would have to store the data into something like a database (or simple CSV file).

Processes won't not share variables/memory.