Run function on WxPython GUI thread
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()
.
精彩评论