Running Python with XAMPP
Mathias K.
mformetalhead at yahoo.de
Wed Jul 18 19:50:14 EDT 2007
Hello everyone!
I just installed Python 2.5 and i want to use Python to build websites.
I could load mod_python successfully with Apache but i fail to let
the .py-files to be executed!
In /htdocs/python i got my test file:
[code=python.py]
from mod_python import apache
def index(req):
req.content_type = "text/html"
req.write("<html><head></head><body>")
req.write("<h1>Python is running with mod_python...</h1>")
return apache.OK
[/code]
And then i got the following code in my httpd.conf:
[code]
<Directory "S:/XAMPP/htdocs">
AddHandler mod_python .py
pythonHandler index
pythonDebug On
</Directory>
[/code]
But when i type "http://localhost/python/python.py" it won't execute!
My browser just shows me the source code. :-(
Please, can anyone tell me what i have to do?
Thanks in advance!
~ Mathias
More information about the Python-list
mailing list