Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96057
| Path | csiph.com!news.mixmin.net!news2.arglkargh.de!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail |
|---|---|
| Return-Path | <kwpolska@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'configure': 0.04; 'subject:help': 0.07; 'cc:addr:python-list': 0.09; 'creation,': 0.09; 'django,': 0.09; 'editor.': 0.09; '\xe2\x80\x94': 0.09; 'python': 0.10; 'python.': 0.11; 'apache': 0.14; 'subject:python': 0.14; 'everyone,': 0.15; 'server,': 0.15; 'http.server': 0.16; 'out?': 0.16; 'subject:run': 0.16; 'url:djangoproject': 0.16; 'wrote:': 0.16; 'frameworks': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'cc:no real name:2**0': 0.22; 'code,': 0.23; 'code.': 0.23; 'advance.': 0.23; 'examples': 0.24; 'header:In-Reply-To:1': 0.24; 'header': 0.24; "doesn't": 0.26; 'command': 0.26; 'chris': 0.26; 'figure': 0.27; 'message-id:@mail.gmail.com': 0.27; 'that.': 0.30; 'url:mailman': 0.30; 'anyone': 0.32; 'run': 0.33; 'url:python': 0.33; 'http': 0.33; 'url:listinfo': 0.34; 'server': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'something': 0.35; 'but': 0.36; 'should': 0.36; 'instead': 0.36; 'url:org': 0.36; 'framework': 0.36; 'urls': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'things': 0.38; 'listing': 0.38; 'manual': 0.38; 'files': 0.38; 'url:en': 0.39; 'url:mail': 0.40; 'subject:with': 0.40; 'your': 0.60; 'personally': 0.61; 'show': 0.62; 'safe': 0.63; 'else.': 0.66; 'guides': 0.72; 'click': 0.76; 'extensions.': 0.84; 'urls,': 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:to :cc:content-type:content-transfer-encoding; bh=B45uFPqBXlN0eelmqLKKGQpzUGfv2heNv2E9Zs6tiQo=; b=Isb8MWoJyTQd1VtTWrHlCaVvvXlk4vUiLsJKlvwt2loeag99U4inVKzDyvD6ZQ+YpH xTmPVH6SRDxmP8x1xWWMtyYe+Dg7EB88a5geMRLy9HmNc0HryOo4SJMZLKud7WCpmvAH UDNGDVNgcHRor+pgS2bKxcl1Uxhuf1uOynL1cXPuQe+vryUrcJZv6KRMhGzjGNjYk2uI 4rT3qeZ1nG2m6M0nOlbTb15SzKMUd9l1guXCrd0OpdePndX5URPS7s3NsD3ia7G7eCJA lnqCc5Wr+FMPlOFX0XSI4QKGX18ADE5vTt7qF/wvRps2QXSNWGFnFFMNNAAX50dFpMJm rtHA== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.176.195 with SMTP id ck3mr18514733vdc.78.1441541797867; Sun, 06 Sep 2015 05:16:37 -0700 (PDT) |
| In-Reply-To | <3877a9ae-edbd-4d36-925a-5cb3789bd1bd@googlegroups.com> |
| References | <3877a9ae-edbd-4d36-925a-5cb3789bd1bd@googlegroups.com> |
| Date | Sun, 6 Sep 2015 14:16:37 +0200 |
| Subject | Re: Can anyone help me run python scripts with http.server? |
| From | Chris Warrick <kwpolska@gmail.com> |
| To | tropical.dude.net@gmail.com |
| Cc | python-list@python.org |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| 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.171.1441541806.8327.python-list@python.org> (permalink) |
| Lines | 47 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1441541806 news.xs4all.nl 23724 [2001:888:2000:d::a6]:33842 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:96057 |
Show key headers only | View raw
On 6 September 2015 at 13:50, <tropical.dude.net@gmail.com> wrote: > Hello everyone, > > I want to use python for web development but I > could not configure my Apache server to run python > with the guides I found on the internet. > > Can anyone help me configure http.server > to run python scripts? > > I ran the command python -m http.server --cgi to start the http server, > and if I put index.html, I will see the page but if I use > index.py, it doesn't show the page, I can only see the > directory listing of the files and when I click on > index.py, it doesn't run the code, I can see it just > like in the editor. > > Can anyone help me out? > > Thanks in advance. > -- > https://mail.python.org/mailman/listinfo/python-list Don’t use http.server. Don’t use CGI. This is not how things work in Python. In Python, you should use a web framework to write your code. Web frameworks include Flask, Django, Pyramid… Find one that’s popular and that you like, and learn that. You won’t have any `.py` URLs, instead you will have modern pretty URLs with no extensions. And a lot of things will be abstracted — no manual header creation, help with safe forms and databases. And then you will need to figure out how to run it. I personally use nginx and uwsgi for this, you may need to look for something else. Examples for Django: https://docs.djangoproject.com/en/1.8/#first-steps https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16
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