Suppose you run 4 engines and you send your 4 scripts to each.
After doing
rc = parallel.Client() view = rc.load_balanced_view() r = view.map_async(my_func, ["script1.py", "script2.py", "script3.py", "script4.py"])
After that, you can access, say, the variable a and b using pull :
var = rc[:].pull(["a","b"]) var.result # or var.r or var.result_dict [[10, 12020.2], [11, 14], [1, 0], [1, 14425]]
Which corresponds to the value of a and b after each run of each script.
So, in script1.py , at the end you have a==10 and b==12020.2 .
Hope this helps.
By the way, I edited the link a little
jrjc source share