2 ====================================
4 Code talks! This is a simple web crawler that fetches a bunch of urls concurrently::
6 urls = ["http://www.google.com/intl/en_ALL/images/logo.gif",
7 "https://wiki.secondlife.com/w/images/secondlife.jpg",
8 "http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif"]
11 from eventlet.green import urllib2
14 return urllib2.urlopen(url).read()
16 pool = eventlet.GreenPool()
17 for body in pool.imap(fetch, urls):
18 print("got body", len(body))
44 Eventlet is made available under the terms of the open source `MIT license <http://www.opensource.org/licenses/mit-license.php>`_