Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:support': 0.07; 'cc:addr:python-list': 0.11; 'excellent!': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'urllib': 0.16; 'wrote:': 0.18; 'possible,': 0.19; 'code,': 0.22; 'cc:addr:python.org': 0.22; 'driver': 0.24; 'visible': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'subject:/': 0.26; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'then.': 0.30; 'message- id:@mail.gmail.com': 0.30; 'worked': 0.33; 'fri,': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'should': 0.36; 'two': 0.37; 'clear': 0.37; 'skip:[ 10': 0.38; 'success,': 0.65; '20,': 0.68; 'to:none': 0.92 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=Gp6lIIpyAff6rVZdXt7lsAsaH6JS+a00vBaX8PXLu9E=; b=z8mPsuc9qPnwk5uXZFb7GmPEgi2lY68upFP/zm5pxOnxsZQqze/D/rnOLj92XNqeWC 3FfDh38XCp4ppw4hiUFKCjrsT5AX8WWvqW26AhgP/THZku5HFJyI9XNjlCUOdfCbFwi7 vFYH/ShxhX+rfABEqv2TPZ3m9kEFz0YY6dS7Ov9D6APHu9swFfDwI2AbHjzqniKuFavx Gwwd7hfb6eI7J40eQVVGtm540TqmnjXwllNL4TtIzvLDy0v0pvg3iaIqYmOeviXzByWg P7MnjDA3k27GTnFGlQ516x5zOW9t2lqo9DUdmXMr5+4uMEBGPoUJktruW0p1tg6LHLd1 msiw== MIME-Version: 1.0 X-Received: by 10.52.93.201 with SMTP id cw9mr402992vdb.80.1403187811858; Thu, 19 Jun 2014 07:23:31 -0700 (PDT) In-Reply-To: <53A2F159.8070809@chamonix.reportlab.co.uk> References: <53A2ABBB.3080907@chamonix.reportlab.co.uk> <53A2CECB.6060605@chamonix.reportlab.co.uk> <53A2F159.8070809@chamonix.reportlab.co.uk> Date: Fri, 20 Jun 2014 00:23:31 +1000 Subject: Re: urllib/urllib2 support for specifying ip address From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1403187820 news.xs4all.nl 2958 [2001:888:2000:d::a6]:54342 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73435 On Fri, Jun 20, 2014 at 12:19 AM, Robin Becker wrote: > in practice [monkeypatching socket] worked well with urllib in python27. Excellent! That's empirical evidence of success, then. Like with all monkey-patching, you need to keep it as visible as possible, but if your driver script is only a page or two of code, it should be pretty clear what's going on. ChrisA