##// END OF EJS Templates
Ported the IPython Sphinx directive to 0.11....
Ported the IPython Sphinx directive to 0.11. This was originally written by John Hunter for the 0.10 API, now it works with 0.11. We still need to automate its test suite, but at least now it runs and the script itself can be executed as a test that produces screen output and figures in a subdir.

File last commit:

r1396:ee81bbeb
r2439:858c6e09
Show More
helloworld.py
14 lines | 532 B | text/x-python | PythonLexer
"""
A Distributed Hello world
Ken Kinder <ken@kenkinder.com>
"""
from IPython.kernel import client
tc = client.TaskClient()
mec = client.MultiEngineClient()
mec.execute('import time')
hello_taskid = tc.run(client.StringTask('time.sleep(3) ; word = "Hello,"', pull=('word')))
world_taskid = tc.run(client.StringTask('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