PDA

View Full Version : How to Run Python .py Program on Web ServeR?



Yuva Raj
March 5th, 2013, 05:14 PM
Hi,
I can run Python program (xx.py) in my Ubuntu through Terminal.
Similarly, how can we run our Python program on Web Server?

The task is that, it listens the Client request & responds according to them.
Here,Python Program acts as a Server side Scripting for our coding.
So,it will be helpful if anybody suggests how to run Or Initialise the Server .py Python program on Web server.

sanderj
March 5th, 2013, 07:02 PM
Search "CGI Python"

Yuva Raj
March 6th, 2013, 07:12 PM
Please look at this : http://fragments.turtlemeat.com/pythonwebserver.php

Here they are running webserver.py in LocalHost.
similarly can i run it in my web site??

Please Help!

sanderj
March 6th, 2013, 08:14 PM
It looks you ignored my advice, so I'll now unsubscribe from this thread.

Good luck.

lykwydchykyn
March 6th, 2013, 08:22 PM
It's hard to understand exactly what you are asking, but if you want to run a python http service:

- You can set up some WSGI framework like Flask, CherryPy or Web.Py behind apache with mod_wsgi
- You can use a library like twisted to implement a simple http service directly

Really depends on what you're actually writing.