##// END OF EJS Templates
A number of changes getting ready for a new ipcluster....
A number of changes getting ready for a new ipcluster. * Added argparse.py to IPython/external * New reuse_furls options to ipcontroller. By default the controller will now delete all old furl files unless the -r flag i given. This is needed so engines starting up don't pick up the old furl files. * Minor logic changes in ipengine and engineconnector related to detecting errors relating to furl files.

File last commit:

r1395:1feaf0a3
r1769:e574479c
Show More
multienginemap.py
17 lines | 414 B | text/x-python | PythonLexer
from IPython.kernel import client
mec = client.MultiEngineClient()
result = mec.map(lambda x: 2*x, range(10))
print "Simple, default map: ", result
m = mec.mapper(block=False)
pr = m.map(lambda x: 2*x, range(10))
print "Submitted map, got PendingResult: ", pr
result = pr.r
print "Using a mapper: ", result
@mec.parallel()
def f(x): return 2*x
result = f(range(10))
print "Using a parallel function: ", result