Question

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!

Was it helpful?

Solution

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:

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top