473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 8479

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John K | last post by:
I am still pretty new to this environment and don't know much about httpd.conf. I understand that it is the place to configure the server but don't know how to actually use it for what I'm trying...
0
by: Gaz | last post by:
Hi guys. I installed XAMPP, an easy to set up Apache, Mysql and PHP server. But im trying to get Python work on it so i can test my scripts. The addon for XAMPP is only for Linux, i wonder if you...
18
by: Frances | last post by:
I want to learn PHP.. I know JSP, Servlets, have been using Tomcat for 2 years now, and even though I know there are ways you can use PHP in conjunction with Tomcat, I'd rather not tinker with...
5
by: Frances | last post by:
a few days ago I installed XAMPP in my Windows 2000 machine, it completely messed my existing MySQL installation.. I've had it installed for over a year now (4.1) have never had any problems with...
1
by: pjpinella | last post by:
Hik, I'm ready to buy a new desktop PC with Windows Vista, but need to be sure XAMPP will run on it OK. I'd much prefer to install using the XAMPP Windows install routine, rather than manually. ...
3
by: lee9372 | last post by:
Is there a way to change default home page under Xampp, so that when I type http://localhost it would go to a home page other than page with popup asking for Xampp authorization.
2
by: maheswaran | last post by:
Friends, I have installed xampp in windows and i want to run a cron job 2 day once or some day intervals. how can i do.Any help would appreciate Maheswaran
5
by: tudorbalan | last post by:
I'm a complete beginner in Perl.In fact... I just need a perl script to upload files to server without having to use html <input type="file"> tag. I found a script...it works when I run it in cmd...
3
by: lollielala | last post by:
Hi every one, I'm new to xampp & configuring etc I've installed, uninstalled, & again with what looks like a successful install. http://localhost/phpmyadmin/ apperas to be working also...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.