Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:help': 0.07; 'creation,': 0.09; 'django,': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'url:pocoo': 0.09; '\xe2\x80\x94': 0.09; 'python.': 0.11; 'subject:python': 0.14; '>in': 0.16; '>that': 0.16; 'advice,': 0.16; 'framework,': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'subject:run': 0.16; 'laura': 0.18; '2015': 0.20; 'to:2**1': 0.21; 'sep': 0.22; 'code.': 0.23; 'header': 0.24; 'chris': 0.26; 'to:no real name:2**1': 0.27; '+0200,': 0.27; 'idea': 0.28; 'received:se': 0.29; 'that.': 0.30; 'url:dev': 0.35; 'should': 0.36; 'instead': 0.36; 'url:org': 0.36; 'framework': 0.36; 'urls': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'things': 0.38; 'manual': 0.38; 'anything': 0.38; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'your': 0.60; 'header:Message-Id:1': 0.61; 'safe': 0.63; 'great': 0.63; 'url:index': 0.67; '>you': 0.84; 'bottle': 0.84; 'extensions.': 0.84; 'header:In-reply-to:1': 0.84; 'urls,': 0.91 To: python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: Can anyone help me run python scripts with http.server? In-reply-to: References: <3877a9ae-edbd-4d36-925a-5cb3789bd1bd@googlegroups.com> Comments: In-reply-to Chris Warrick message dated "Sun, 06 Sep 2015 14:16:37 +0200." MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <31113.1441542506.1@fido> Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Sep 2015 14:28:26 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Sun, 06 Sep 2015 14:28:29 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441542515 news.xs4all.nl 23848 [2001:888:2000:d::a6]:38261 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96058 In a message of Sun, 06 Sep 2015 14:16:37 +0200, Chris Warrick writes: >Don=E2=80=99t use http.server. Don=E2=80=99t use CGI. This is not how thi= ngs work in Python. > >In Python, you should use a web framework to write your code. Web >frameworks include Flask, Django, Pyramid=E2=80=A6 Find one that=E2=80=99= s popular and >that you like, and learn that. You won=E2=80=99t have any `.py` URLs, ins= tead >you will have modern pretty URLs with no extensions. And a lot of >things will be abstracted =E2=80=94 no manual header creation, help with = safe >forms and databases. This is really great advice, and if your idea is 'but I don't want anything as _big_ as a framework, look at flask http://flask.pocoo.org/ and bottle http://bottlepy.org/docs/dev/index.html both of which are tiny microframeworks. Laura