Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from multiprocessing import Pool
- import urllib, time, os
- def esplora(url):
- print("Sto leggendo {0} (proc:{1})".format(url, os.getpid()))
- urllib.urlretrieve("http://{0}".format(url), url)
- if __name__ == '__main__':
- p = Pool(3)
- p.map(esplora, ["www.ubuntu.com", "www.linux.org", "www.python.org"]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement