[mod_python] Faulty Impressions

Graham Dumpleton grahamd at dscpl.com.au
Sat Mar 4 15:29:17 EST 2006


On 04/03/2006, at 11:47 PM, Michael Guerrero wrote:

> Hello,
>
> I'm new to mod_python and am planning a simple LAMPy application  
> (brace yourselves, newbness ensues).
>
> Based on what I've found on the web (though certainly not an  
> exhaustive search), it appears mod_python is used for two kinds of  
> web apps:
>
> 1. CGI -- making it much faster by embedding the interpreter.
> 2. PSP -- giving an easy, PHP-like use to Python for web development.

On the contrary, it is probably used in a lot more different ways  
than that.

3. Publisher (mod_python.publisher) -- providing dispatching  
mechanism for URLs
4. Vampire -- dispatching plus other assorted bits and pieces
5. MPServlets -- dispatching and servlet like infrastructure
6. Custom Handlers -- handlers written for a specific purpose by user

A good number of people combine use of 2 and 3. Other combine other  
third
party generic template packages such as Cheetah, Mighty etc etc. The  
power of
mod_python is that it is so flexible and so many ways that things  
could be done.

> I haven't quite figured out how the different handlers fit into all  
> this, but am still perusing the documentation--having no knowledge  
> of Apache or how it works doesn't help ;^).

Read:

   http://162.105.203.19/apache-doc/22.htm#BIN57

It is from a book about Perl and C programming with Apache but is still
relevant to mod_python.

> My question is, is there another means for creating dynamic web  
> content using mod_python (not talking about frameworks like Zope/ 
> Django).
>
> Also, somewhat unrelated, how is the performance of using things  
> like pickled() objects and shelves versus relational databases when  
> serving content?

Pickling used in the context of mod_python has some limitations which
you need to be mindful of. See:

   http://www.dscpl.com.au/articles/modpython-005.html

Graham



More information about the Mod_python mailing list