Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'demanding': 0.09; 'batteries': 0.16; 'from:addr:mhammond': 0.16; 'from:addr:skippinet.com.au': 0.16; 'from:name:mark hammond': 0.16; 'message-id:@skippinet.com.au': 0.16; 'received:150.101': 0.16; 'received:150.101.137': 0.16; 'received:adl2.internode.on.net': 0.16; 'received:internode.on.net': 0.16; 'received:on.net': 0.16; 'stdlib.': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'stick': 0.18; 'issue.': 0.19; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.22; 'fine': 0.24; 'libraries': 0.24; 'cc:2**0': 0.26; 'fact': 0.27; 'beyond': 0.28; 'permission': 0.28; 'cc:addr:python.org': 0.29; 'seem': 0.29; 'pm,': 0.29; 'threads': 0.30; 'modules': 0.32; 'header:User-Agent:1': 0.33; 'external': 0.35; 'install': 0.35; 'received:au': 0.36; 'http': 0.37; 'but': 0.37; 'using': 0.37; 'received:192': 0.38; 'relatively': 0.39; 'difficult': 0.39; "i'd": 0.39; 'your': 0.61; 'processes,': 0.67; 'compete.': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAFQfRk98vbWM/2dsb2JhbAAMOK9nhWwBAQEEOEABEAsYCRYPCQMCAQIBRQYNAQcBAcBQjQQIDRgBAgsEBQILAggDAgUfAgMDAoUXCoQbBKg5 Date: Thu, 23 Feb 2012 22:20:40 +1100 From: Mark Hammond User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a2) Gecko/20120131 Thunderbird/11.0a2 MIME-Version: 1.0 To: Plumo Subject: Re: asynchronous downloading References: <33089103.45.1329980290357.JavaMail.geo-discussion-forums@pbne2> In-Reply-To: <33089103.45.1329980290357.JavaMail.geo-discussion-forums@pbne2> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1329996043 news.xs4all.nl 6953 [2001:888:2000:d::a6]:34574 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20722 On 23/02/2012 5:58 PM, Plumo wrote: > I want to download content asynchronously. This would be > straightforward to do threaded or across processes, but difficult > asynchronously so people seem to rely on external libraries (twisted > / gevent / eventlet). Exactly - the fact it's difficult is why those tools compete. > (I would use gevent under different circumstances, but currently need > to stick to standard libraries.) As above - use threads or processes - they are fine for relatively modest tasks. If your needs go beyond modest, I'd reevaluate your need to stick with just the stdlib - even demanding *sync* http apps often wind up using modules outside the stdlib. Look into virtualenv etc if permission to install packages is the issue. Batteries included free, but turbo-chargers are an extra ;) Mark