开发者

PyGTK: Controlling interface from within joined thread

I have a thread in PyGTK, inside my mainloop. It's a Timer, so it needed to be joined with .join(). The problem is, I now cannot edit my UI from in that thread - change text and so on - because of the .join(). Is there a way I can change things from outside (well, you know what I mean) the开发者_如何学Python mainloop?

Thanks.


instead of using a Timer thread, use glib.timeout_add to do your thing. It works together with gtk's mainloop and runs in the same thread, so you don't have to do anything special.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜