对于 Python Web 框架,我个人更喜欢 Django。 使用起来很快,而且它有很多开箱即用的功能(我认为“包含电池”,正如他们网站上所说的那样)。 Pylons 是另一个受欢迎的选择。
Twisted is a good choice. I used it a few years ago to build a server for a browser-based online game I wrote - it kept track of clients, served them replies to Ajax requests, and used HTML5 Server-Sent DOM Events as well. Worked rather painlessly thanks to Twisted's good HTTP library.
For a Python web framework, I personally favor Django. It's quick to get going with it, and it has a lot of functionality out of the box ("batteries included" as it says on their site I think). Pylons is another popular choice.
You can use Nevow, which is a web framework that is built on top of Twisted. The documentation for Nevow includes a fully functional two-way chat application including examples of how to write unit tests for it.
I'd suggest you use Twisted. ;) It has both chat clients and chat servers. Then you also need a web framework. I'd use either Grok or BFD, but there are many Python Web Frameworks around, and few of them are really bad.
Because you seem to be looking for both Comet functionality and a Web Framework, you might have a look here: http://github.com/clemesha/hotdot which is a complete example of combining Django, Orbited, and Twisted.
发布评论
评论(5)
扭扭捏捏是个不错的选择。 几年前,我使用它为我编写的基于浏览器的在线游戏构建了一个服务器 - 它跟踪客户端,为它们提供对 Ajax 请求的回复,并使用 HTML5 服务器发送的 DOM 事件。 得益于 Twisted 良好的 HTTP 库,工作起来相当轻松。
对于 Python Web 框架,我个人更喜欢 Django。 使用起来很快,而且它有很多开箱即用的功能(我认为“包含电池”,正如他们网站上所说的那样)。 Pylons 是另一个受欢迎的选择。
Twisted is a good choice. I used it a few years ago to build a server for a browser-based online game I wrote - it kept track of clients, served them replies to Ajax requests, and used HTML5 Server-Sent DOM Events as well. Worked rather painlessly thanks to Twisted's good HTTP library.
For a Python web framework, I personally favor Django. It's quick to get going with it, and it has a lot of functionality out of the box ("batteries included" as it says on their site I think). Pylons is another popular choice.
您可以使用 Nevow,这是一个构建在 扭曲。 Nevow 的文档包括功能齐全的 双向聊天应用程序,包括如何编写 对其进行单元测试。
You can use Nevow, which is a web framework that is built on top of Twisted. The documentation for Nevow includes a fully functional two-way chat application including examples of how to write unit tests for it.
我建议你使用 Twisted。 ;) 它有聊天客户端和聊天服务器。 那么你还需要一个Web框架。 我会使用 Grok 或 BFD,但是周围有很多 Python Web 框架,而且其中很少有真正糟糕的。
I'd suggest you use Twisted. ;) It has both chat clients and chat servers. Then you also need a web framework. I'd use either Grok or BFD, but there are many Python Web Frameworks around, and few of them are really bad.
大多数 XMPP 服务器支持 BOSH。 如果您使用 strope javascript 库,您只需担心演示 - 其余的都已完成为你。
Most XMPP servers support BOSH. If you use the strophe javascript library, you have only to worry about presentation -- the rest is done for you.
因为您似乎正在寻找 Comet 功能和 Web 框架,所以您可能会在这里查看: http:// github.com/clemesha/hotdot 这是一个结合 Django、Orbited 和 Twisted 的完整示例。
Because you seem to be looking for both Comet functionality and a Web Framework, you might have a look here: http://github.com/clemesha/hotdot which is a complete example of combining Django, Orbited, and Twisted.