Let's first introduce what mod_python is and then show some examples.
mod_python is an Apache module that embeds the Python interpreter within the web server.
With CGI, a separate process is spawn and its output is then returned to the client's application; every request to a CGI script creates a new process, and this results in unnecessary CPU and I/O activity that poses serious problems to application scalability.
mod_python solves this problem by embedding the Python interpreter directly into the Apache processes, thus speeding up the applications response time. Not having to start a Python interpreter at every request eliminates the typical startup penalty of CGI.
The result is that you can make ...