Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96094

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

Path csiph.com!news.mixmin.net!news2.arglkargh.de!feeder.erje.net!1.eu.feeder.erje.net!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:help': 0.07; 'cc:addr:python-list': 0.09; 'apache,': 0.09; 'likewise': 0.09; 'python': 0.10; '"this': 0.13; 'apache': 0.14; 'subject:python': 0.14; '"python': 0.16; 'debugging,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'simplicity.': 0.16; 'simpson': 0.16; 'subject:run': 0.16; 'wrote:': 0.16; 'app': 0.16; 'else,': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'sep': 0.22; 'programming': 0.22; 'bit': 0.23; 'header:In-Reply-To:1': 0.24; 'all.': 0.24; 'mon,': 0.24; "i've": 0.25; 'message-id:@mail.gmail.com': 0.27; "i'm": 0.30; 'that.': 0.30; 'work.': 0.30; 'code': 0.30; 'push': 0.30; 'another': 0.32; 'ideal': 0.32; 'run': 0.33; 'running': 0.34; 'received:google.com': 0.35; 'something': 0.35; 'but': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'front': 0.38; 'anything': 0.38; 'application': 0.39; 'subject:with': 0.40; 'great': 0.63; 'cameron': 0.66; 'production': 0.67; 'chrisa': 0.84; 'intending': 0.84; 'presumably': 0.84; "there'll": 0.84; 'absolutely': 0.88; 'to:none': 0.91; 'careful': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=/xQJWB1KrmGtWFdKPK+EceZQl+sZ8QNmBXhTt/rf4D0=; b=C1fJ7tjOMuNjTVfDiXA5Z9gOWzDcHxZVa2AgGJaAWBpaj01yWfCH9KSSImInhe6La0 QCHg/Njjm8TdCC3iEEQ7so/J94dtboQYXUDboFYJVpMs2v+PJ59x5eNsnkOFRmbF63Qh Yzyrcp+EcKHIftCMaAU1tymJVCayl4CihC3gJIYmaXauu8Uf/Vq0UFuhdDmjO7SSpuxs EO/OTVyCuM3hlBnRVuLi5wUWlFK90MMwaMqqPqm9jed9mdQaRILPm4Qxu73txWblvXNO Q4H0vxftCKeHPBdgUTJwMa1dvBRDqV5LjnzeYNI7tLDN8R4pE68Lsa00trGWEyt5Yiau oEDA==
MIME-Version 1.0
X-Received by 10.50.98.7 with SMTP id ee7mr26271092igb.13.1441601837720; Sun, 06 Sep 2015 21:57:17 -0700 (PDT)
In-Reply-To <20150907040525.GA47613@cskk.homeip.net>
References <CAPTjJmrXJeTHdZjg+O7j63-QGE2VwV8PHy2J2PwBe5NGM-5isA@mail.gmail.com> <20150907040525.GA47613@cskk.homeip.net>
Date Mon, 7 Sep 2015 14:57:17 +1000
Subject Re: Can anyone help me run python scripts with http.server?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.193.1441601839.8327.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1441601839 news.xs4all.nl 23745 [2001:888:2000:d::a6]:40052
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 4407
X-Received-Body-CRC 1690510001
Xref csiph.com comp.lang.python:96094

Show key headers only | View raw


On Mon, Sep 7, 2015 at 2:05 PM, Cameron Simpson <cs@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Can anyone help me run python scripts with http.server? Chris Angelico <rosuav@gmail.com> - 2015-09-07 14:57 +1000

csiph-web