Can anyone help me run python scripts with http.server?

tropical.dude.net at gmail.com tropical.dude.net at gmail.com
Sun Sep 6 08:42:23 EDT 2015


On Sunday, September 6, 2015 at 2:16:04 PM UTC+2, Laura Creighton wrote:
> In a message of Sun, 06 Sep 2015 04:50:23 -0700, wr
> ites:
> >Hello everyone,
> >
> >I want to use python for web development but I
> >could not configure my Apache server to run python
> >with the guides I found on the internet.
> >
> >Can anyone help me configure http.server
> >to run python scripts?
> >
> >I ran the command python -m http.server --cgi to start the http server,
> >and if I put index.html, I will see the page but if I use
> >index.py, it doesn't show the page, I can only see the
> >directory listing of the files and when I click on 
> >index.py, it doesn't run the code, I can see it just
> >like in the editor.
> >
> >Can anyone help me out?
> >
> >Thanks in advance.
> 
> What operating system are you running?  It sounds to me as if you haven't
> configured apache to add a Handler for python scripts, or you have, but
> forgot to restart apache after you did so.
> 
> Laura

I am using Windows 7, I followed the instructions, modified httpd.conf
many times, restarted apache many times till I gave up 



More information about the Python-list mailing list