Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: asyncio - run coroutine in the background Date: Sun, 21 Feb 2016 08:47:28 +1100 Lines: 23 Message-ID: References: <8737sumpjl.fsf@elektro.pacujo.net> <87h9ha8lt0.fsf@jester.gateway.pace.com> <87d1rwpwo2.fsf@elektro.pacujo.net> <87r3gc608i.fsf@elektro.pacujo.net> <871t877ru6.fsf@jester.gateway.pace.com> <87oabbpzoo.fsf@elektro.pacujo.net> <87twl36amj.fsf@jester.gateway.pace.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de kZWNpYYyTKFDdffBDi5BigpRlYMd19nuQzcgqXfRP46A== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; '21,': 0.07; 'mentioned,': 0.07; 'tool,': 0.07; 'cc:addr:python-list': 0.09; 'dns,': 0.09; 'lookup': 0.09; 'python': 0.10; '2016': 0.16; 'bindings.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lookups': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:run': 0.16; 'url:gnu': 0.16; 'wrote:': 0.16; 'language': 0.19; 'library': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'martin': 0.22; 'explicit': 0.22; 'am,': 0.23; 'feb': 0.23; 'header:In-Reply-To:1': 0.24; 'all.': 0.24; 'message-id:@mail.gmail.com': 0.27; 'url:software': 0.29; 'program,': 0.29; 'another': 0.32; "can't": 0.32; 'url:python': 0.33; 'mass': 0.33; 'received:google.com': 0.35; 'library.': 0.35; 'knowledge': 0.35; 'quite': 0.35; 'but': 0.36; 'there': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; '(and': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; "won't": 0.38; 'received:209': 0.38; 'anything': 0.38; 'end': 0.39; 'does': 0.39; 'subject:the': 0.39; 'more.': 0.63; 'sharing': 0.64; 'benefit': 0.66; 'chrisa': 0.84; 'nicely.': 0.84; 'nss': 0.84; 'ultimately,': 0.84; 'to:none': 0.91 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; bh=MsURy0X8F9fBR0ZSfJJuWjfjBJzdSiFtJNIgkzhrq6E=; b=X8jm8B428kH1KGOjBYEpZa7e/xycLola9U257i1VYxN8ZRVHYhrhpUwBRaKZ2+mp7X uG7KPn+teKabPiu6mhrMrKV3l5OUc7rg3j1uHIL5138m+R4sRgCjniSRT4xxT48XQdbg ObtdEJeKNK2pQMFlz8faJbp0uQASivF0K6FOOSVzEZFKAJjDzf7j32UETm75/9RnNVrS UhvvT53duwa1q+7kMkJAQOMPJOMw/lFZZ4XPHkrRaBS0GgoX7iMAVojukDF/pafgt+9T sVMaGIORg47pCuzZrB6wy6xZorivkdiC/btY7bbQbuognfROH4d/CeE4Wc1WKpzamx4o woNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=MsURy0X8F9fBR0ZSfJJuWjfjBJzdSiFtJNIgkzhrq6E=; b=Y5CxM8tHnAOG6EPXozOOvT8BVLsVFzeghUUStosJlZT+jH/xD/DAiQB91eeDW/7rzd GmwMzbz9jbbHKhUQbvQ4PKH4/mOrMxnpyVhf3ZZdYmK4Bnc/lrPI6sPU5mMmsxQd//IF Sca1x73cu58Tg3ikW0Mg53EWjQAZnDSMgkd5WwDvgfTLlhWozxoeNL3lL4uA/s4Ngqyo sgnOXz8TDpTmAB+0hl5hJ1fLwaX0tuIEstjj/oShPZRHWcqSXG2qgO9MHuEaF2RUJQsN knEJrSgl94JVMlffJUq47ml3ku/8RVmOS1vzamyn/yxdGKHXxjUnWiJkxqk6YW9V4kj1 gH9g== X-Gm-Message-State: AG10YOQ/WGBnMIY9p+XaGMCSMZzvMuLkGsr8Av4u7GYQBvI1YwwO/7cOEww+34soR9xWU+IbFXnRo5Zb+BMpfA== X-Received: by 10.50.30.2 with SMTP id o2mr3840152igh.13.1456004848863; Sat, 20 Feb 2016 13:47:28 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103278 On Sun, Feb 21, 2016 at 4:45 AM, Martin A. Brown wrote: > Another (non-Python) DNS name lookup library that does practically > the same thing (along with the shortcomingsn you mentioned, Chris: > no NSS nor /etc/hosts) is the adns library. Well, it is DNS, after > all. > > http://www.gnu.org/software/adns/ > https://pypi.python.org/pypi/adns-python/1.2.1 > > And, there are Python bindings. I have been quite happy using the > adns tools (and tools built on the Python bindings) for mass lookups > (millions of DNS names). It works very nicely. > > Just sharing knowledge of an existing tool, > Ultimately, anything that replaces a gethostbyname/getaddrinfo call with an explicit DNS lookup is going to have the exact same benefit and downside: lookups won't freeze the program, but you can't use /etc/hosts any more. (Slightly sloppy language but that's how an end user will see it.) ChrisA