[mod_python] psp_site example doesn't work

Jorey Bump list at joreybump.com
Sun Jan 23 18:07:58 EST 2005

Zach White wrote:

> http://beta.rvmotel.com/index/index
> http://beta.rvmotel.com/index.py/index
> Not a big deal, but not really ideal, either. It means I'll have to use 
> AddHandler and have an index.html or index.cgi that redirects the user to
> the real index page. From my own developing standpoint, I'd rather not have
> to do that. But from the standpoint of the people I'm doing this for, it
> doesn't matter.

I use the Publisher handler exclusively, and do all of my development 
this way, with one exception: I avoid using the name "index" like the 
plague in module or function names! AddHandler lets you add index.html 
to the directory if you feel you must, but it doesn't even make sense to 
try to include index.py in the DirectoryIndex; it would be like trying 
to put 20 versions of example.exe in a Windows directory. Start off by 
giving all of your applications unique names and you'll avoid namespace 
pollution issues that trip up a lot of mod_python newbies.

To clarify, if you have a foo.py located *anywhere*, don't reuse the 
name in another module. Choose a sensible function to start with 
(remember, this is with Publisher in mind) and distribute the URL:


I've had no issues with users misunderstanding such URLs and achieve a 
terrific hassle-free separation between applications this way. 
AddHandler lets me mix file types in a directory, and MultiViews lets me 
drop the .py extension in the URL.

More information about the Mod_python mailing list