how do I write to a parent dictionary?
<p>How do I write to a parent's dictionary? I've given a list of urls to some children to retrieve, which then need to write to the parent's dictionary:</p>

<pre><code>from multiprocessing import Pool
import random

parent_dict={}
urls = ['www.yahoo.com','www.google.com','www.microsoft.com','www.apple.com','www.cisco.com']

def workit(url):
    # retrieve the urls, process some stuff and then add that info to parent_dict
    key = random.randrange(1,10) # pretend that this is the variable that we want in parent_dict
    value = random.randrange(11,20)
    parent_dict[key] = value

pool = Pool(processes = 5)
pool.map(workit,urls)


print parent_dict # returns {}}
</code></pre>
