471,339 Members | 1,268 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,339 software developers and data experts.

Running Python with XAMPP

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
0 8370

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by John K | last post: by
reply views Thread by Gaz | last post: by
18 posts views Thread by Frances | last post: by
5 posts views Thread by Frances | last post: by
1 post views Thread by pjpinella | last post: by
3 posts views Thread by lee9372 | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.