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


Groups > comp.lang.python > #107016

RE: how to setup for localhost:8000

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Dan Strohl <D.Strohl@F5.com>
Newsgroups comp.lang.python
Subject RE: how to setup for localhost:8000
Date Thu, 14 Apr 2016 21:14:05 +0000
Lines 76
Message-ID <mailman.119.1460668518.15650.python-list@python.org> (permalink)
References <5ea1e31b-09ba-4b6a-be8b-58886c5c5f81@googlegroups.com> <CA+y5TLbED=JjcPG4-qfn=7tH=Y=6PQa+MMpvh_8uNT2srh7dBw@mail.gmail.com> <mailman.112.1460658199.15650.python-list@python.org> <2e597a56-00ab-4370-b337-667f34eac56a@googlegroups.com> <52d7db080498466ebdc51cf019479c3e@seaexchmbx03.olympus.F5Net.com>
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de uffo6J+fFTeVIVLxOh/67wUII2a0SJmkLKL8JXko0rfA==
Return-Path <prvs=905411792=D.Strohl@f5.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'warnings': 0.03; 'present,': 0.07; 'timeout': 0.09; 'url:localhost': 0.09; 'python': 0.10; 'thursday,': 0.13; 'suggest': 0.15; 'message-----': 0.15; 'thu,': 0.15; '"well,': 0.16; '(about': 0.16; '2016': 0.16; 'correctly,': 0.16; 'down).': 0.16; 'http.server': 0.16; 'reached,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'servers),': 0.16; 'skip:[ 50': 0.16; 'something.': 0.16; 'url:8000': 0.16; 'wrote:': 0.16; 'to:name :python-list@python.org': 0.20; 'work,': 0.21; 'to:2**1': 0.21; 'saying': 0.22; 'assumes': 0.22; 'correctly.': 0.22; 'trying': 0.22; 'errors': 0.23; 'thanks,': 0.24; 'tried': 0.24; 'header:In- Reply-To:1': 0.24; "doesn't": 0.26; 'example': 0.26; 'figure': 0.27; 'error': 0.27; 'parameters': 0.27; 'least': 0.27; '14,': 0.27; 'andrew': 0.27; 'errors.': 0.27; 'blocking': 0.29; 'dan': 0.29; 'firewall': 0.29; 'received:192.168.10': 0.29; 'url:mailman': 0.30; 'code': 0.30; 'window': 0.30; 'probably': 0.31; "can't": 0.32; 'url:python': 0.33; 'http': 0.33; 'rule': 0.33; 'skip:- 10': 0.34; 'url:listinfo': 0.34; 'except': 0.34; 'server': 0.34; 'list': 0.34; 'sent:': 0.35; 'could': 0.35; 'subject:': 0.35; "isn't": 0.35; 'but': 0.36; 'url:org': 0.36; 'possible': 0.36; '(and': 0.36; 'email addr:python.org': 0.36; 'url:library': 0.36; 'url:non-standard http port': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'charset:us- ascii': 0.37; 'anything': 0.38; 'someone': 0.38; 'hi,': 0.38; 'why': 0.39; 'sure': 0.39; 'does': 0.39; 'from:': 0.39; 'received:192': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'url:3': 0.60; 'your': 0.60; 'address': 0.61; 'email addr:gmail.com': 0.62; 'show': 0.62; 'back': 0.62; 'is.': 0.63; 'different': 0.63; 'more.': 0.63; 'python-list': 0.66; 'email name :python-list': 0.67; 'results.': 0.67; 'serving': 0.67; 'expert': 0.70; 'below:': 0.71; 'url:http': 0.75; 'forth': 0.79; 'received:192.168.15': 0.84; 'utc-4,': 0.84; 'working,': 0.84; 'subject::': 0.85
DKIM-Signature v=1; a=rsa-sha256; c=simple/simple; d=f5.com; i=@f5.com; q=dns/txt; s=seattle; t=1460668518; x=1492204518; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=VwmcTyRvqSiGSJIQBWpICD/7AjhkWJmmhA88UbhOW7Q=; b=AC6/6jwV7xokKz/u6njkHwMxAnzWnJtI69OwVp+GNx3+VkzjtxAge/DB wJ/NNafx9+bYloCZSyZRzGrYFW4e7W/R02VlZjQ///ukBsgCWioJ24DKs 3jRuJNVkFPazYvYeFGz/3ryl0ayG8393+7gmqWlxZPv3H5js6RBNuBMTb I=;
X-IronPort-AV E=Sophos;i="5.24,485,1454976000"; d="scan'208";a="213036775"
Thread-Topic how to setup for localhost:8000
Thread-Index AQHRlnZUnqwWZKRiWEOLVb3Jbt9ccJ+KOT2A//+6J8yAAAI1AA==
In-Reply-To <2e597a56-00ab-4370-b337-667f34eac56a@googlegroups.com>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-ms-exchange-transport-fromentityheader Hosted
x-originating-ip [192.168.15.239]
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
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>
X-Mailman-Original-Message-ID <52d7db080498466ebdc51cf019479c3e@seaexchmbx03.olympus.F5Net.com>
X-Mailman-Original-References <5ea1e31b-09ba-4b6a-be8b-58886c5c5f81@googlegroups.com> <CA+y5TLbED=JjcPG4-qfn=7tH=Y=6PQa+MMpvh_8uNT2srh7dBw@mail.gmail.com> <mailman.112.1460658199.15650.python-list@python.org> <2e597a56-00ab-4370-b337-667f34eac56a@googlegroups.com>
Xref csiph.com comp.lang.python:107016

Show key headers only | View raw


If you got an empty page with no errors (and no warnings trying to get there...) it is likely that your server is working, and you are trying to access it correctly, but the server is not serving anything.  Most of the time, if the server is not present, you will get a timeout error saying the browser could not connect to server xxx. Or the site can't be reached, or something.

I am not however much of an expert in figuring out WHY it isn't showing anything  (I used a different lib for http servers), but I am sure someone else on this list is.  I can only tell you that you probably at least launched the server correctly.

Have you tried the example on the page in the docs? (about 3/4 of the way down).
https://docs.python.org/3/library/http.server.html

If that doesn't work, it's possible you have a firewall or browser rule blocking something... and it if does work, you can look back at your code to see what might be wrong.  (I suggest playing with the log_request, log_error, and log_message parameters to figure out what is happening.)  

OF course, that all assumes that someone else smarter than I on this list doesn't come forth and just say... "well, just do this, and poof, all  will be good".

Sorry it's not more.

Dan

 

> -----Original Message-----
> From: Python-list [mailto:python-list-bounces+d.strohl=f5.com@python.org]
> On Behalf Of wrh8609@gmail.com
> Sent: Thursday, April 14, 2016 1:50 PM
> To: python-list@python.org
> Subject: Re: how to setup for localhost:8000
> 
> On Thursday, April 14, 2016 at 2:23:36 PM UTC-4, Andrew Farrell wrote:
> > What happens when you type
> >
> > http://localhost:8000
> >
> > Into the address bar of your browser as this is running?
> >
> > On Thu, Apr 14, 2016 at 12:46 PM, <wrh8609@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > I am working on window 7 and Python 3.5 to setup a localhost:8000
> > > but it did not get through as shown below:
> > > > python -m http.server
> > > Serving HTTP on 0.0.0.0 port 8000 ...
> > >
> > > But it did not show the results.
> > >
> > > Can someone help me how to setup the localhost?
> > >
> > > Thanks,
> > > Wen-Ruey
> > >
> > > --
> > > https://mail.python.org/mailman/listinfo/python-list
> > >
> 
> hi Andrew,
> 
> Yes. after I type http:\\localhost:8000, the browser did not show anything
> except a empty page without any errors.
> 
> Thanks,
> Wen-Ruey
> --
> https://mail.python.org/mailman/listinfo/python-list

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


Thread

how to setup for localhost:8000 wrh8609@gmail.com - 2016-04-14 10:46 -0700
  Re: how to setup for localhost:8000 Peter Otten <__peter__@web.de> - 2016-04-14 20:07 +0200
  Re: how to setup for localhost:8000 Andrew Farrell <armorsmith42@gmail.com> - 2016-04-14 13:06 -0500
    Re: how to setup for localhost:8000 wrh8609@gmail.com - 2016-04-14 13:50 -0700
      RE: how to setup for localhost:8000 Dan Strohl <D.Strohl@F5.com> - 2016-04-14 21:14 +0000
      Re: how to setup for localhost:8000 Pierre Quentel <pierre.quentel@gmail.com> - 2016-04-15 12:03 -0700
        Re: how to setup for localhost:8000 wrh8609@gmail.com - 2016-04-16 15:35 -0700
          Re: how to setup for localhost:8000 Monte Milanuk <memilanuk@gmail.com> - 2016-04-17 09:27 -0700
          Re: how to setup for localhost:8000 Pierre Quentel <pierre.quentel@gmail.com> - 2016-04-17 10:11 -0700
            Re: how to setup for localhost:8000 wrh8609@gmail.com - 2016-04-22 14:41 -0700
  Re: how to setup for localhost:8000 Random832 <random832@fastmail.com> - 2016-04-14 14:36 -0400
  Re: how to setup for localhost:8000 Chris Angelico <rosuav@gmail.com> - 2016-04-15 04:39 +1000
  Re: how to setup for localhost:8000 Vito De Tullio <vito.detullio@gmail.com> - 2016-04-15 07:59 +0200
  Re: how to setup for localhost:8000 Chris Angelico <rosuav@gmail.com> - 2016-04-15 17:38 +1000

csiph-web