Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96068
| Path | csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!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.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'configure': 0.04; 'subject:help': 0.07; 'cc:addr:python-list': 0.09; 'scripts': 0.09; 'part,': 0.09; 'php,': 0.09; 'url:github': 0.09; 'python': 0.10; 'apache': 0.14; 'subject:python': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:mail- ig0-x22a.google.com': 0.16; 'simplicity,': 0.16; 'subject:run': 0.16; 'wrote:': 0.16; 'config': 0.18; 'example.': 0.18; 'frameworks': 0.18; 'project,': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'function,': 0.22; 'sep': 0.22; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'required.': 0.26; 'message-id:@mail.gmail.com': 0.27; 'looks': 0.29; 'routing,': 0.29; 'code': 0.30; 'compared': 0.30; 'run': 0.33; 'file': 0.34; 'server': 0.34; 'received:google.com': 0.35; 'something': 0.35; 'but': 0.36; 'framework': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'seem': 0.37; 'stuff': 0.38; 'test': 0.39; 'does': 0.39; 'where': 0.40; 'subject:with': 0.40; 'some': 0.40; 'per': 0.62; 'future,': 0.70; '11:07': 0.84; 'chrisa': 0.84; 'simple:': 0.84; 'skip:/ 30': 0.84; 'to:none': 0.91; 'offline.': 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=u6G2P71yhJSZ1IUvVzsVObd5jfA8zEOqvqcD9Oovfc4=; b=G4CD70QIExIwPN0TsGUijwkJGWnCT0SEaZq253GAlAYjePqCK11aQ65wio/GRYE3Bw 8SdYqcmNAUhXd+g0dWxHB+ZcQJ2KeIcPaHbEV2j3Vk2j2V2DhH5RDSMW8xbf7kchXbgU bX29Gl7+xoj8pTlGlvWYwhHu14Ca2+3ar8khSTffuj8aPDxq+FjTEvOUfGOwSPFpAtXr vSMnhJr0DfhZ/HU8w+/GGgHDnlHbWoLFEzX2sYZdBP0o6qiwhUIkXChdU4+CyOCk7s8T e2nPHZed3hiv/ZGcj//UG99tmcEGqXdv3GR70ZFmNfc08kkQ1KHMV1cC9QQ1j7sNWUH+ o4ng== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.3.66 with SMTP id a2mr22892802iga.92.1441545794609; Sun, 06 Sep 2015 06:23:14 -0700 (PDT) |
| In-Reply-To | <361cf277-b469-4873-891d-0153498794ef@googlegroups.com> |
| References | <3877a9ae-edbd-4d36-925a-5cb3789bd1bd@googlegroups.com> <mailman.170.1441541749.8327.python-list@python.org> <31ec836b-4cb0-4079-8c12-f6b66a5cd143@googlegroups.com> <mailman.176.1441543545.8327.python-list@python.org> <361cf277-b469-4873-891d-0153498794ef@googlegroups.com> |
| Date | Sun, 6 Sep 2015 23:23:14 +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.177.1441545797.8327.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1441545797 news.xs4all.nl 23838 [2001:888:2000:d::a6]:37658 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:96068 |
Show key headers only | View raw
On Sun, Sep 6, 2015 at 11:07 PM, <tropical.dude.net@gmail.com> wrote:
> I will definitely look into python web frameworks in the future, they seem
> complicated to me compared to php for example. I am looking for the simplest
> way to test my python scripts till I understand better how it works and when
> I can configure my own web server to run the framework because I want develop my
> stuff offline.
Look into Flask. You can do something really simple:
https://github.com/Rosuav/MinstrelHall
All the code is in one file for simplicity, though for a larger
project, you can break it up as required. (Compared to PHP, where
you're _forced_ to have exactly one file per entry-point, this is a
nice flexibility.) Then I just have one line in my Apache config file
that looks something like this:
WSGIScriptAlias / /path/to/scripts/MinstrelHall/mh.wsgi
and Apache does all the rest. There's some cruft in that code to get
around a few oddities, but for the most part, writing a page is as
simple as writing a function, decorated to manage routing, that
returns render_template("somefile.html"). It's pretty easy.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Can anyone help me run python scripts with http.server? tropical.dude.net@gmail.com - 2015-09-06 04:50 -0700
Re: Can anyone help me run python scripts with http.server? Laura Creighton <lac@openend.se> - 2015-09-06 14:15 +0200
Re: Can anyone help me run python scripts with http.server? tropical.dude.net@gmail.com - 2015-09-06 05:35 -0700
Re: Can anyone help me run python scripts with http.server? tropical.dude.net@gmail.com - 2015-09-06 05:38 -0700
Re: Can anyone help me run python scripts with http.server? Laura Creighton <lac@openend.se> - 2015-09-06 14:45 +0200
Re: Can anyone help me run python scripts with http.server? tropical.dude.net@gmail.com - 2015-09-06 06:07 -0700
Re: Can anyone help me run python scripts with http.server? Chris Angelico <rosuav@gmail.com> - 2015-09-06 23:23 +1000
Re: Can anyone help me run python scripts with http.server? Denis McMahon <denismfmcmahon@gmail.com> - 2015-09-06 20:04 +0000
Re: Can anyone help me run python scripts with http.server? Chris Angelico <rosuav@gmail.com> - 2015-09-07 12:48 +1000
Re: Can anyone help me run python scripts with http.server? Laura Creighton <lac@openend.se> - 2015-09-06 17:03 +0200
Re: Can anyone help me run python scripts with http.server? Chris Angelico <rosuav@gmail.com> - 2015-09-07 01:13 +1000
Re: Can anyone help me run python scripts with http.server? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-09-06 13:11 -0400
Re: Can anyone help me run python scripts with http.server? tropical.dude.net@gmail.com - 2015-09-06 05:42 -0700
Re: Can anyone help me run python scripts with http.server? Chris Warrick <kwpolska@gmail.com> - 2015-09-06 14:16 +0200
Re: Can anyone help me run python scripts with http.server? Laura Creighton <lac@openend.se> - 2015-09-06 14:28 +0200
Re: Can anyone help me run python scripts with http.server? Peter Otten <__peter__@web.de> - 2015-09-06 14:32 +0200
Re: Can anyone help me run python scripts with http.server? Peter Otten <__peter__@web.de> - 2015-09-06 14:43 +0200
Re: Can anyone help me run python scripts with http.server? tropical.dude.net@gmail.com - 2015-09-06 05:47 -0700
csiph-web