[mod_python] Best place to start learning both mod_python and Python

Matt Goodall matt at pollenation.net
Sun Oct 26 21:21:28 EST 2003


Robert Lilly wrote:

>>Hi!
>>
>>    
>>
[snip]

>>There are a few ways to interface Python and Apache, but
>>mod_python is the
>>best. (In my opinion as a member of the mod_python mailing list ;-) ).
>>Another way to do it is by using regular CGI, where each .py file is
>>basically a script that is run externally by Apache. This has much lower
>>performance, and doesn't make it easier to develop, so I'd stay
>>away. There
>>was also a module named mod_snake that supposedly had better
>>performance than
>>mod_python, but I don't think it's supported anymore. Finally,
>>there's Zope,
>>which is an enterprise server based on Python. Haven't really
>>used it, but
>>it's supposed to be good. www.zope.org.
>>    
>>
>Thanks for the quick response Mike. I especially appreciate the information
>about using the Python interpreter as I was not aware of that capability.
>  
>
The interpreter is a fantastic tool for testing out ideas, you'll use it 
a lot. Also worth a mention is IPython (http://ipython.scipy.org/) which 
aims to be a better Python shell. It's got some great features for 
inspecting objects, getting help, looking at source code etc.

>I agree with you regarding staying away from CGI. I intend to do this
>whether I'm using Python, PHP, or whatever. I've heard of Zope, but from
>what I see, it's way overkill for my needs.
>  
>
Traditional CGI is slow but SCGI 
(http://www.mems-exchange.org/software/scgi/) and FastCGI 
(http://www.fastcgi.com/) are Apache modules that provide a CGI-like 
interface to long-running Python applications. I find SCGI particularly 
useful during development as there is no need to restart Apache to 
reload an application - just Ctrl-C your application and start it again.

Cheers, Matt

-- 
Matt Goodall, Pollenation Internet Ltd
w: http://www.pollenation.net
e: matt at pollenation.net




More information about the Mod_python mailing list