##// END OF EJS Templates
Misc updates the display system....
Misc updates the display system. * PNG base64 encoding is now done at the ZMQ level, not in the display formatter itself. * All formatters are documented as to the exact nature of their return value. PNGs are not base64 encoded, LaTeX must include $/$$, Javascript should not have the <script> tags, etc. * Updated the Circle display example in docs/examples/core. * Renamed the sympy printing extension to sympyprinting.py.

File last commit:

r3690:aafdf2be
r3880:e7df0ac1
Show More
multiengine2.py
28 lines | 753 B | text/x-python | PythonLexer
#-------------------------------------------------------------------------------
# Imports
#-------------------------------------------------------------------------------
import time
from IPython.parallel import Client
#-------------------------------------------------------------------------------
# Setup
#-------------------------------------------------------------------------------
mux = Client()[:]
mux.clear()
mux.block=False
ar1 = mux.apply(time.sleep, 5)
ar2 = mux.push(dict(a=10,b=30,c=range(20000),d='The dog went swimming.'))
ar3 = mux.pull(('a','b','d'), block=False)
print "Try a non-blocking get_result"
ar4 = mux.get_result()
print "Now wait for all the results"
mux.wait([ar1,ar2,ar3,ar4])
print "The last pull got:", ar4.r