Matplotlib and mod_python
Let's first introduce what mod_python is and then show some examples.
What is mod_python
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 web applications that are many times faster than the CGI approach and have full access to advanced features (such as database connection retention between hits) and to Apache internals.
Also, simple Python scripts and programs benefit from this approach...