Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我用 PySimpleGUI 设计的 GUI 中连续显示我在 Flask 服务器中收到的一些数据。目前我的 GUI 和我的 Flask Server 是两个独立的项目,连接它们的最干净/最佳实践方法是什么?
您在 PySimpleGUI 中“接收数据”的方式将在事件循环中。通常与 GUI 子系统的通信是通过队列之类的。
在您的通话中使用超时值window.Read(timeout=100),使其不会完全阻塞。这将使它能够读取队列或进行函数调用或执行它必须做的任何事情来获取数据。
window.Read(timeout=100)