from IPython import parallel def run_stuff(): def func(x): return x rc = parallel.Client(profile='sge') dview = rc[:] dview['func'] = func print dview.map_sync(func, range(10)) run_stuff()