[mod_python] Questions on path_info and PSP

Andrew Barilla drew at exit66.com
Tue May 4 11:53:50 EST 2004

I set up mod_python 3.1 up with the following configuration:

<Directory /home/httpd/html/test>
    SetHandler mod_python
    PythonHandler mod_python.publisher
    PythonDebug on

I have mptest.py in the test directory with an index function and a test
function so both http://localhost/test/mptest and
http://localhost/test/mptest/test work.  But,
http://localhost/test/mptest/test/whatever does not.  Is it possible to set
things up so the test function is called and I can get the 'whatever' part
from req.path_info?

On another note and I'm sure there is a simple answer to this that I'm
overlooking, but I did the example of using PSP files as templates from this
(http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.html) but
it's returning the html page as text.  i.e. I see


in the browser.  Do I need to set the content type somewhere or something?


More information about the Mod_python mailing list