如何从 ipython 启动twisted的反应器
我需要从 ipython 中启动一个twisted'reactor,以允许继续交互。 Ipython 的手册页引用了twisted,但我无法理解应该如何继续。文档引用了 IPython.kernel.twistedutil,所以我的印象是它应该是一个标准解决方案......提前感谢
sandro *:-)
I need to start a twisted'reactor from within ipython in a way that allows to go on interacting. Ipython's man page has references to twisted but I couldn't understand the way I should proceed. Documentation references IPython.kernel.twistedutil so that my impression is that it should be a standard solution... Thanks in advance
sandro
*:-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你是这个意思吗?
http://code.activestate.com/recipes/410670- Integrated-twisted-reactor-with-ipython/
这将在 IPython 主线程旁边的线程中启动 Twisted 反应器。您应该能够从 IPython 访问 Twisted 线程。
另一种可能的解决方案是启动沙井 "Service" 与
.tac
文件中的 Twisted 应用程序一起。Is this what you mean?
http://code.activestate.com/recipes/410670-integrating-twisted-reactor-with-ipython/
This will start the Twisted reactor in a thread alongside IPython's main thread. You should be able to access the Twisted thread from IPython.
Another possible solution would be to start a manhole "Service" alongside your Twisted application in a
.tac
file.