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


Groups > comp.lang.python > #33370

Re: Subprocess puzzle and two questions

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <kushal.kumaran@gmail.com>
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; 'reason,': 0.07; '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; 'included,': 0.16; 'roy': 0.16; 'subject:questions': 0.16; 'wrote:': 0.17; 'thu,': 0.17; '>>>': 0.18; 'sender:addr:gmail.com': 0.18; 'all,': 0.21; 'bit': 0.21; 'exists.': 0.22; '15,': 0.23; "python's": 0.23; 'seems': 0.23; 'random': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; '(most': 0.27; 'skip:( 20': 0.28; 'chris': 0.28; 'run': 0.28; 'servers.': 0.29; 'surprised': 0.29; 'writes:': 0.29; 'probably': 0.29; "i'm": 0.29; 'that.': 0.30; 'query': 0.30; 'basic': 0.30; 'point': 0.31; 'received:209.85.160.46': 0.32; 'choices': 0.33; 'to:addr:python-list': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'server': 0.35; 'decisions': 0.35; 'nov': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; "didn't": 0.36; 'level': 0.37; 'being': 0.37; 'quite': 0.37; 'received:209': 0.37; 'far': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'easier': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'application': 0.40; 'where': 0.40; 'think': 0.40; 'your': 0.60; 'networking': 0.60; 'most': 0.61; 'skip:n 10': 0.63; '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=sender:from:to:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=lShH/hHXAKVyLSAmE1iCJsIwN+Xl8J3AVeDqcRyTiqw=; b=S2WE+C8taQWyjUadeYdhQom2B0wiy1VrQD9WfyNWmBQoq/v4yDaaLwnIzSkpjgMsJy uhRM2wxPVSFz9ua0IMAIPMDqN0t7n4GnakvzzLaUaJS2T/qnzIIZHlLdOHHNrxBQFuYg C0ACfR4Te1r+DSi73n3pGAsgQsllHK0xXOVvcYwmyzY7ejs5AGbNuI7eqiuM2apkEF33 0mWhmISz7RtSVLM67yMxXyB+MT/ATVEJrF5OHeduObMnrb2i40TnOjSMob1e52LN3dOi yTPFQz+1htTHGcCsFRhkJWFw7pBilHqZxCgAOPLLI0GFAPj2zvFhcRrhyOiSfXjcgTDa cwPA==
Sender Kushal Kumaran <kushal.kumaran@gmail.com>
From Kushal Kumaran <kushal.kumaran+python@gmail.com>
To python-list@python.org
Subject Re: Subprocess puzzle and two questions
In-Reply-To <CAPTjJmq-fXG4v9fYdj+ZnVagqGxJ+VwdJzyf9CC_D7JUKU7UHg@mail.gmail.com>
References <mailman.3664.1352867713.27098.python-list@python.org> <mailman.3666.1352873042.27098.python-list@python.org> <roy-F5C640.09225714112012@news.panix.com> <mailman.3684.1352904008.27098.python-list@python.org> <k80gd6$t0q$1@panix2.panix.com> <mailman.3700.1352930072.27098.python-list@python.org> <roy-BF8F05.20491814112012@news.panix.com> <CAPTjJmq-fXG4v9fYdj+ZnVagqGxJ+VwdJzyf9CC_D7JUKU7UHg@mail.gmail.com>
User-Agent Notmuch/0.14 (http://notmuchmail.org) Emacs/24.1.1 (x86_64-pc-linux-gnu)
Date Thu, 15 Nov 2012 10:23:08 +0530
MIME-Version 1.0
Content-Type text/plain
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3710.1352955207.27098.python-list@python.org> (permalink)
Lines 40
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1352955207 news.xs4all.nl 6982 [2001:888:2000:d::a6]:46106
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33370

Show key headers only | View raw


Chris Angelico <rosuav@gmail.com> writes:

> On Thu, Nov 15, 2012 at 12:49 PM, Roy Smith <roy@panix.com> wrote:
>> In article <mailman.3700.1352930072.27098.python-list@python.org>,
>>  Chris Angelico <rosuav@gmail.com> 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.)
>

Indeed.  Most people would prefer if random applications didn't make
their own decisions about using specific DNS servers.  That way, the
users can make their own configuration choices (gai.conf, nsswitch.conf)
according to their site preferences.

If your application needs that level of control (if you're writing a
nslookup replacement for some reason, perhaps), dnspython
(www.dnspython.org) seems to have it.

-- 
regards,
kushal

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


Thread

Subprocess puzzle and two questions wrw@mac.com - 2012-11-13 22:34 -0500
  Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-13 23:41 -0500
    Re: Subprocess puzzle and two questions William Ray Wing <wrw@mac.com> - 2012-11-14 00:03 -0500
      Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-14 09:22 -0500
        Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 01:40 +1100
          Re: Subprocess puzzle and two questions roy@panix.com (Roy Smith) - 2012-11-14 11:20 -0500
            Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 08:54 +1100
              Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-14 20:49 -0500
                Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 13:04 +1100
                Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-14 21:10 -0500
                Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 13:21 +1100
                Re: Subprocess puzzle and two questions Dave Angel <d@davea.name> - 2012-11-14 21:55 -0500
                Re: Subprocess puzzle and two questions Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2012-11-15 10:23 +0530
                Re: Subprocess puzzle and two questions Nobody <nobody@nowhere.com> - 2012-11-15 22:54 +0000
                Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-15 20:07 -0500
                Re: Subprocess puzzle and two questions Nobody <nobody@nowhere.com> - 2012-11-17 00:17 +0000
              DNS from Python (was Re: Subprocess puzzle and two questions) aahz@pythoncraft.com (Aahz) - 2012-11-14 21:42 -0800
        Re: Subprocess puzzle and two questions wrw@mac.com - 2012-11-14 09:37 -0500
  Re: Subprocess puzzle and two questions Tim Roberts <timr@probo.com> - 2012-11-13 23:17 -0800

csiph-web