[mod_python] displaying python output

Petros Keshishian pkeshishian at yahoo.com
Tue Dec 23 12:16:17 EST 2003


I am trying to setup mod_python for the first time and
everything seems to be working, except instead of
displaying the output from mod_python in clients
browser it is asking for the file name to save the
output. If you save the output it is exactly what it
was supposed to display. Here is the famous hello.py
that I am using to test the setup.

def say(req,what="Nothing"):
    return "I am saying %s" % what

It is in /usr/local/apache2/htdocs/py-bin/ directory.
The following is set in the http.conf file:

<Directory "/usr/local/apache2/htdocs/py-bin">
                                                      
                                                      
   
    SetHandler python-program
    PythonHandler mod_python.publisher
    PythonDebug On
                                                      
                                                      
   
</Directory>

I am trying to access hello/say using:

http://localhost/py-bin/hello/say

How do I change the output to be directed to the
browser instead of a file.

Thanks a lot for your help
Petros



__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/


More information about the Mod_python mailing list