By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,318 Members | 2,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,318 IT Pros & Developers. It's quick & easy.

Running Python with XAMPP

P: n/a
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:

Expand|Select|Wrap|Line Numbers
  1. from mod_python import apache
  2.  
  3. def index(req):
  4. req.content_type = "text/html"
  5. req.write("<html><head></head><body>")
  6. req.write("<h1>Python is running with mod_python...</h1>")
  7. return apache.OK
  8.  
And then i got the following code in my httpd.conf:

Expand|Select|Wrap|Line Numbers
  1. <Directory "S:/XAMPP/htdocs">
  2. AddHandler mod_python .py
  3. pythonHandler index
  4. pythonDebug On
  5. </Directory>
  6.  
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
Jul 18 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.