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

Chris Angelico rosuav at gmail.com
Mon Sep 7 00:57:17 EDT 2015


On Mon, Sep 7, 2015 at 2:05 PM, Cameron Simpson <cs at zip.com.au> wrote:
> Another nice thing about Flask is that you can run it standalone without
> Apache. I'm knocking something together right now using Flask, and I'm
> intending to run it without Apache at all. There'll be an haproxy in front
> of it for other reasons, but to get off the ground you don't even need that.

Running a Flask app standalone is, if I'm not mistaken, good for
low-traffic usage only. Makes it absolutely ideal for debugging, but
not so great for production work. But since you don't have to change a
single line of application code to slot it into Apache, and presumably
likewise for working with haproxy or anything else, it's a worthwhile
simplicity.

I've taken a good number of students through a Python web programming
course, and we use Flask all the way. Testing? "python run.py".
Production? "git push heroku master". No effort required, no careful
juggling of "this bit makes it work in production".

ChrisA



More information about the Python-list mailing list