Running Python with XAMPP

M

Mathias K.

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:
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

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>

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top