##// END OF EJS Templates
Adding examples from ipython1-dev to docs/examples/kernel. These ...
Adding examples from ipython1-dev to docs/examples/kernel. These examples show how to use IPython for parallel computing. I need to update the import statements and make sure they work with the merged code. But here they are.

File last commit:

r1337:53a3e331
r1337:53a3e331
Show More
task1.py
17 lines | 353 B | text/x-python | PythonLexer
from ipython1.kernel import client
tc = client.TaskClient()
rc = client.MultiEngineClient()
rc.push(dict(d=30))
cmd1 = """\
a = 5
b = 10*d
c = a*b*d
"""
t1 = client.Task(cmd1, clear_before=False, clear_after=True, pull=['a','b','c'])
tid1 = tc.run(t1)
tr1 = tc.get_task_result(tid1,block=True)
tr1.raiseException()
print "a, b: ", tr1.ns.a, tr1.ns.b