Python 3 的事件循环实现?
有谁知道可用于 Python 3 的事件循环库(或绑定)?如果它只支持 UNIX 系统也没关系,但我更喜欢也支持 Windows 系统。
预计到达:我意识到编写一个事件循环系统并不是非常困难。但是,我不想重新发明轮子(这些天我们仍然鼓励不要这样做,对吧?;-))
这是为服务器应用程序计划的,所以显然我想要一些不与GUI小部件工具包什么的。
如果答案是“不,没有”(可能;我确实找不到)那么我很可能会为 libev 创建一个 Python 3 的绑定。
Does anyone know of an event loop library (or bindings) available for Python 3? It's okay if it only does UNIX systems, though I would prefer something that does Windows as well.
ETA: I realize that it is not terribly difficult to write an event loop system. However, I don't want to reinvent the wheel (we are still encouraging not doing so these days, right? ;-))
This is planned for a server application, so obviously I'd want something that isn't tied to a GUI widget toolkit or something.
If the answer is "Nope, there isn't one" (probably; I sure as heck can't find one) then I will most likely create a binding for Python 3 for libev.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议这样:
但是,为了使其工作,您需要让事件系统将可调用事件放入队列中。
(如果您对特定框架(例如 GTK、Qt、WxWidgets、NCurses、Cocoa、Winforms 等)的绑定更感兴趣,那么就说吧!) 。
I suggest something like:
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 可作为 pyev 模块用于 Python:http://code. google.com/p/pyev/
libev is available for python as pyev module: http://code.google.com/p/pyev/