Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'subject:two': 0.07; 'python': 0.09; 'high-level': 0.09; 'library': 0.15; 'slightly': 0.15; 'stack': 0.15; 'batteries': 0.16; 'bind': 0.16; 'boasts': 0.16; 'caring': 0.16; 'dig': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'included,': 0.16; 'roy': 0.16; 'subject:questions': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'all,': 0.21; 'bit': 0.21; 'exists.': 0.22; '15,': 0.23; "python's": 0.23; 'header:In-Reply- To:1': 0.25; '(most': 0.27; 'message-id:@mail.gmail.com': 0.27; 'skip:( 20': 0.28; 'chris': 0.28; 'run': 0.28; 'surprised': 0.29; 'probably': 0.29; "i'm": 0.29; 'that.': 0.30; 'query': 0.30; 'basic': 0.30; 'point': 0.31; 'to:addr:python-list': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'server': 0.35; 'nov': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'being': 0.37; 'quite': 0.37; 'received:209': 0.37; 'far': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'easier': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'networking': 0.60; 'most': 0.61; 'deeply': 0.66; 'facilities': 0.69; 'smith': 0.71; 'article': 0.78; 'routines': 0.84; 'serious': 0.98 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 :content-type; bh=yJGiKp6uojL5ST5O0zrPhivfQK6XyjKwU+3mD6/Lc4U=; b=lsuKL5zCy6wwbwF0/ZqVG6GeB0JvzDW3WncunPw7TyQro9jlzQwng+KJ1FLjo9odg+ neOfEDTOneKYHSD20kIITxY2yLlClefCfnMGHS0loXd3rdU7Hs+oOGDsd0bdElLHgaFv rg6Kqm9BSswpivOz2WVe+fFF1XLKKSS42qIOi/UC2UwificW8Op8PrOVqIaXSFDcxN4/ lQlJRaSUrNd6E2DHJshNaSpFwe9N28rKjRsh1CJY1XsocN6n97aik8OUMaJPvZekJr78 bd8JstKFK8qM4xbh6Vv2FlBB23hEbhgtFJZEKXq/RTm4QxU1zS4g+M7cYe8sakjUlcyp jbRg== MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 15 Nov 2012 13:04:21 +1100 Subject: Re: Subprocess puzzle and two questions From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352945064 news.xs4all.nl 6855 [2001:888:2000:d::a6]:39885 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33366 On Thu, Nov 15, 2012 at 12:49 PM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> I'm slightly surprised that there's no way with the Python stdlib to >> point a DNS query at a specific server > > Me too, including the "only slightly" part. The normal high-level C > resolver routines (getaddrinfo/getnameinfo, or even the old > gethostbyname series), don't expose any way to do that. You have to dig > quite far down in the resolver library stack to get to the point where > you can do that. The concept of not knowing or caring which specific > server has the data you need is quite deeply baked into the basic DNS > architecture. Indeed. But Python boasts that the batteries are included, and given the wealth of other networking facilities that are available, it is a bit of a hole that you can't run DNS queries in this way. Mind you, if Python's managed to get this far without it being a major stumbling-block, that probably means that it's not a serious lack. And I don't think many people write DNS *servers* in Python. (Most people don't write DNS servers at all, since BIND exists. But I did exactly that this week, since it would be easier than most other options.) ChrisA