开发者

Run function on WxPython GUI thread

开发者 https://www.devze.com 2023-02-07 09:12 出处:网络
part-time C# programmer here trying to learn Python. I am looking to be able to, from another thread, set up a function that will be run on the GUI thread in WxPython. Currently the only way I can th

part-time C# programmer here trying to learn Python.

I am looking to be able to, from another thread, set up a function that will be run on the GUI thread in WxPython. Currently the only way I can think of doing this is to push the function onto some cross-thread-synchronized list, then have a timer firing every few milliseconds (on the GUI thread) that checks the list and runs any functions that have been pushed onto it. I was wondering if there was instead a more canonical way of doing this, similar to BeginIn开发者_高级运维voke in .NET.


wx.CallLater and wx.CallAfter().

0

精彩评论

暂无评论...
验证码 换一张
取 消