与 mod_wsgi 相比,mod_python 如何“工作”?
似乎大多数博客文章都与 mod_python 相关。 mod_wsgi 专注于告诉我 mod_wsgi 如何更好以及 WSGI 应用程序是什么样子。这很好,但我真正想知道的是:
它们在运行脚本方面有何不同?
使用 CGI,服务器只需设置环境并运行简单的 .py。 WSGI 将应用程序包装在一个对象中,但概念仍然几乎相同:运行 .py 文件。
mod_python 是如何做到的?
我也非常有兴趣了解 mod_ 的工作原理,所以,真的,请随意向我指出有关该主题的任何有趣的内容。
谢谢!
It seems most of the blog posts the web relating to mod_python & mod_wsgi concentrate on telling me how mod_wsgi is better and what a WSGI application looks like. This is fine, but what I'd really want to know -- to have complete knowledge of the subject -- is:
How do they differ in running a script?
With CGI the server simply sets up the environment and runs a simple .py. WSGI wraps the application in an object, but the concept is still pretty much the same: run a .py file.
How does mod_python do it?
I'm also really interested in learning how anything mod_ works, so, really, feel free to point me to anything interesting on the subject.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以首先阅读:
http:// /blog.dscpl.com.au/2009/03/python-interpreter-is-not-created-for.html
何时/如何创建和使用子解释器的基本原理与 mod_wsgi 中相同以及。
问题是为什么您想要使用 mod_python 作为学习其工作原理的基础,因为 mod_python 已不再开发并且已被 Apache 软件基金会移至阁楼。如果您打算降低到该级别,mod_wsgi 模块还可以修复 mod_python 在线程处理方面出现的各种问题。
You could start by reading:
http://blog.dscpl.com.au/2009/03/python-interpreter-is-not-created-for.html
The basic principle of when/how sub interpreters are created and used is the same in mod_wsgi as well.
The question is why you would want to use mod_python as a basis for learning how it works as mod_python is no longer being developed and has been moved to the attic by the Apache software foundation. The mod_wsgi module also fixes various things mod_python gets wrong with thread handling if your intention is to go down to that level.
查看mod_python官方文档,即:
在实践中,请注意,在使用 python 和 web 时,通常根本不需要运行 Apache,因为有很多很多方法可以直接从 python
标准库 提供页面:
外部 Web 服务器:
外部 Web 框架:
See the official mod_python documentation, namely:
In practice, please note that there usually is no need to run Apache at all when working with python and web as there are many, many ways of serving the pages from python directly
Standard library:
External web servers:
External Web frameworks: