apache+ python ?

eugene kim eugene1977 at hotmail.com
Wed Oct 9 09:34:23 CEST 2002


thank you for quick answer..

well what i'll be doing is 
db access, file uploading, xml generate/parsing

speed doesn't matter .. but if using mod_python is not too much 
complicated,(it all depends how fast i can learn & use.. well that's the 
purpose of using python, isn't it?) i want to try it.

i think i 've succeeded installing mod_python..
i have question though, maybe i have to ask this to apache forum,
what's 'PythonHandler' in httpd.conf?
i could access and print something with welcome_test.py(shown below) 
but i can't access other *.py files...
----------------------
from mod_python import apache
def handler(req):

    welcome = "<h1>mod_python welcomes you!</h1>"

    req.content_type = "text/html"
    req.send_http_header()
    req.write(welcome)

    return apache.OK

===================================
<Directory /usr/local/apache/htdocs/python>
AddHandler python-program .py
PythonHandler welcome_test
PythonDebug On
</Directory>

thank you



More information about the Python-list mailing list