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


Groups > comp.lang.python > #73434

Re: urllib/urllib2 support for specifying ip address

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; 'subject:support': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'hostname': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'urllib': 0.16; 'wrote:': 0.18; "hasn't": 0.19; 'cc:addr:python.org': 0.22; 'installation': 0.23; 'header:User- Agent:1': 0.23; 'cc:2**0': 0.24; 'subject:/': 0.26; 'code:': 0.26; 'required.': 0.27; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; '(which': 0.31; 'changed.': 0.31; 'worked': 0.33; 'updated': 0.34; 'beyond': 0.35; 'step': 0.37; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'address.': 0.39; 'received:org': 0.40; 'received:109': 0.72; '..........': 0.84; 'sfxlen:4': 0.84; 'ships': 0.84; 'pfxlen:big': 0.91; 'that),': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Robin Becker <robin@reportlab.com>
Subject Re: urllib/urllib2 support for specifying ip address
Date Thu, 19 Jun 2014 15:19:05 +0100
References <53A2ABBB.3080907@chamonix.reportlab.co.uk> <CAPTjJmosrF1pKKEiLdPg_XOwmZMNMtgH13YipSxJWg-VZ9kAkg@mail.gmail.com> <53A2CECB.6060605@chamonix.reportlab.co.uk> <CAPTjJmq+e9FCu90hmfRbUW3+r5rrtcSdqsFpANaqa_f4gGhEHA@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Cc "python-list@python.org" <python-list@python.org>
X-Gmane-NNTP-Posting-Host 109.174.168.73
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <CAPTjJmq+e9FCu90hmfRbUW3+r5rrtcSdqsFpANaqa_f4gGhEHA@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.11154.1403187555.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1403187555 news.xs4all.nl 2894 [2001:888:2000:d::a6]:48856
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73434

Show key headers only | View raw


On 19/06/2014 13:03, Chris Angelico wrote:
.........
>> I can use python >= 3.3 if required.
>
> The main reason I ask is in case something's changed. Basically, what
> I did was go to my Python 2 installation (which happens to be 2.7.3,
> because that's what Debian Wheezy ships with - not sure why it hasn't
> been updated beyond that), pull up urllib2.py, and step through
> manually, seeing where the hostname gets turned into an IP address.
> Hence, this code:
.........
in practice this approach worked well with urllib in python27.
-- 
Robin Becker

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


Thread

Re: urllib/urllib2 support for specifying ip address Robin Becker <robin@reportlab.com> - 2014-06-19 15:19 +0100

csiph-web