How to receive data in a PySimpleGUI GUI? How to receive data in a PySimpleGUI GUI? flask flask

How to receive data in a PySimpleGUI GUI?


The way you "receive data" in PySimpleGUI will be inside the event loop. Usually communicating with a GUI subsystem is through something like a queue.

Use a timeout values on your window.Read(timeout=100) call so that it doesn't completely block. This will enable it to read the queue or make a function call or do whatever it has to do to get the data.