This of course disregards the #1 reason to use mod_python (or mod_perl, mod_ruby, or any other fully-integrated scripting language Apache module): namely, because you're not just limited to generating dynamic content.<p>The Apache request-handling chain is much richer than simply passing off incoming requests to a CGI or PHP script. Using mod_{perl,python,ruby,etc.}, you can implement authenticators, URL-rewriting modules, log handlers, output filters, etc., and take advantage of the mature Apache infrastructure for such code.<p>Basically, if you want to be able to slice and dice HTTP requests at every stage of processing, not just the content-generation one, the Apache mod_* add-ons are a pretty powerful tool for doing just that.
Mod_python seems to be very promising and robust from the first sight. I've tried mod_python and it left me delighted for several reasons; some of them:<p>1. You can get total control over the request.<p>2. Mod_python provides a set of wrappers to mimic standart python CGI objects what greatly simplifies your life<p>3. Basic load tests say that mod_python is robust and fast<p>4. Installation is easy<p>The only thing that I've found confusing is unicode support (take a look at <a href="http://www.modpython.org/pipermail/mod_python/2004-June/015825.html" rel="nofollow">http://www.modpython.org/pipermail/mod_python/2004-June/0158...</a>)<p>The only thing that I need to know about mod_python - is the list of successful commercial deployments.<p>What about the cons, I would also like to know who are these guys from this PoundPythonWeb, they look like someone official,
but I'm always feel suspicious when someone says: "Don't use this" (except the case when the person is the author :))
A very unconvincing list.<p>1. That's what package managers are for.<p>2. If you're in the position of configuring your own web server then this probably doesn't matter to you.<p>3. See #1.<p>4. True, but your /usr/bin/python processes will be lighter because they won't exist.<p>5. I have no idea if this is true, but no evidence is provided.<p>6. My personal experience with mod_proxy has been...unhappy.<p>7. ???<p>8. See #5.
I'm currently just using mod_python for my Trac installation, but it's ridiculously slow. Any suggestions?<p>Edit: I switched to using fcgi and it's <i>wayyyy</i> faster. So there's reason #9.
I thought the whole point of mod_python was performance. Since it runs inside the apache process it doesn't have to spawn a new python interpreter for every page request. Am I mistaken? Does fastcgi and/or mod_wsgi solve the same issue?