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


Groups > comp.lang.python > #33303

Re: Subprocess puzzle and two questions

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <wrw@mac.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'badly': 0.07; 'returned.': 0.07; 'subject:two': 0.07; 'python': 0.09; 'command-line': 0.09; 'ping': 0.09; 'cc:addr:python-list': 0.10; '"good': 0.16; 'getaddrinfo': 0.16; 'received:mac.com': 0.16; 'roy': 0.16; 'subject:questions': 0.16; 'wrote:': 0.17; 'exists': 0.17; 'received:10.0.1': 0.17; 'specify': 0.17; 'thanks,': 0.18; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; "doesn't": 0.28; 'this?': 0.28; "i'm": 0.29; '(and': 0.32; 'url:python': 0.32; 'utility': 0.33; 'received:10.0': 0.33; 'server': 0.35; 'nov': 0.35; 'path': 0.35; 'received:17': 0.35; 'doing': 0.35; 'pm,': 0.35; 'really': 0.36; 'but': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'charset:us-ascii': 0.36; 'why': 0.37; 'subject:: ': 0.38; 'fact': 0.38; 'url:docs': 0.38; 'received:10': 0.38; 'takes': 0.39; 'days': 0.60; 'more': 0.63; 'within': 0.64; 'response.': 0.67; 'smith': 0.71; 'article': 0.78; 'directly.': 0.78; 'mistaken': 0.84; 'incredibly': 0.96
MIME-version 1.0
Content-transfer-encoding 7BIT
Content-type text/plain; CHARSET=US-ASCII
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:5.9.8185,1.0.431,0.0.0000 definitions=2012-11-14_01:2012-11-14, 2012-11-14, 1970-01-01 signatures=0
X-Proofpoint-Spam-Details rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1211130351
References <mailman.3664.1352867713.27098.python-list@python.org> <roy-9D599D.23412413112012@news.panix.com>
In-reply-to <roy-9D599D.23412413112012@news.panix.com>
X-Mailer iPad Mail (10A523)
From William Ray Wing <wrw@mac.com>
Subject Re: Subprocess puzzle and two questions
Date Wed, 14 Nov 2012 00:03:51 -0500
To Roy Smith <roy@panix.com>
Cc "python-list@python.org" <python-list@python.org>
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.3666.1352873042.27098.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1352873042 news.xs4all.nl 6848 [2001:888:2000:d::a6]:57925
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33303

Show key headers only | View raw


On Nov 13, 2012, at 11:41 PM, Roy Smith <roy@panix.com> wrote:

> In article <mailman.3664.1352867713.27098.python-list@python.org>,
> wrw@mac.com wrote:
> 
>> I need to time the operation of a command-line utility (specifically 
>> nslookup) from within a python program I'm writing.
> 
> Ugh.  Why are you doing this?  Shelling out to nslookup is an incredibly 
> slow and clumsy way of doing name translation.  What you really want to 
> be doing is calling getaddrinfo() directly.
> 
> See http://docs.python.org/2/library/socket.html#socket.getaddrinfo for 
> details.
> -- 
Because, unless I'm badly mistaken (very possible), getaddrinfo doesn't let me specify the server from which the name is returned. I'm really not after the name, what I'm REALLY after is the fact that a path exists to the name server I specify (and how long it takes to respond). In the "good old days" I would just have ping'd it, but these days more and more DNS boxes (and servers of all sorts) are shutting off their ping response.

Thanks, Bill

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