##// END OF EJS Templates
Clean up some dosctrings, remove unused function
Clean up some dosctrings, remove unused function

File last commit:

r1338:72652d65
r1365:53d7eeb0
Show More
helloworld.py
14 lines | 520 B | text/x-python | PythonLexer
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337 """
A Distributed Hello world
Ken Kinder <ken@kenkinder.com>
"""
Brian E Granger
Fixed most of the examples. A few still don't work, but this is a start.
r1338 from IPython.kernel import client
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337
tc = client.TaskClient()
mec = client.MultiEngineClient()
mec.execute('import time')
hello_taskid = tc.run(client.Task('time.sleep(3) ; word = "Hello,"', pull=('word')))
world_taskid = tc.run(client.Task('time.sleep(3) ; word = "World!"', pull=('word')))
print "Submitted tasks:", hello_taskid, world_taskid
print tc.get_task_result(hello_taskid,block=True).ns.word, tc.get_task_result(world_taskid,block=True).ns.word