##// END OF EJS Templates
Lots of work on exception handling, including tests for traceback printing....
Lots of work on exception handling, including tests for traceback printing. We finally have some tests for various exception mode printing, via doctests that exercise all three modes! Also changed handling of sys.exit(X) to only print the summary message, as SystemExit is most often a 'handled' exception. It can still be 100% silenced via '%run -e', but now it's much less intrusive. Added a new %tb magic to print the last available traceback with the current xmode. One can then re-print the last traceback with more detail if desired, without having to cause it again.

File last commit:

r1396:ee81bbeb
r2440:0caaf43a
Show More
helloworld.py
14 lines | 532 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')
Brian E Granger
Fixing more tests and examples after the task, map and @parallel work.
r1396 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')))
Brian E Granger
Adding examples from ipython1-dev to docs/examples/kernel. These ...
r1337 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