2 ====================================
4 Code talks! This is a simple web crawler that fetches a bunch of urls concurrently:
9 "http://www.google.com/intl/en_ALL/images/logo.gif",
10 "http://python.org/images/python-logo.gif",
11 "http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif",
15 from eventlet.green import urllib2
18 return urllib2.urlopen(url).read()
20 pool = eventlet.GreenPool()
21 for body in pool.imap(fetch, urls):
22 print("got body", len(body))
48 Eventlet is made available under the terms of the open source `MIT license <http://www.opensource.org/licenses/mit-license.php>`_