Event loop implementation for Python 3?

你说的曾经没有我的故事 提交于 2019-12-01 00:41:52

I suggest something like:

while True:
    while queue:
        queue.pop()()

For that to work, however, you need to have the event system put callable events onto the queue.

(If you are more interested in a specific binding to a specific framework, such as GTK, Qt, WxWidgets, NCurses, Cocoa, Winforms, whatever, then say that!).

libev is available for python as pyev module: http://code.google.com/p/pyev/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!