environment/lib/python2.7/site-packages/IPython/parallel/client/magics.py
def parallel_execute(self, cell, block=None, groupby='type', save_name=None):
        """implementation used by %px and %%parallel"""

        # defaults:
        block = self.view.block if block is None else block
        
        base = "Parallel" if block else "Async parallel"
        
        targets = self.view.targets
        if isinstance(targets, list) and len(targets) > 10:
            str_targets = str(targets[:4])[:-1] + ', ..., ' + str(targets[-4:])[1:]
        else:
            str_targets = str(targets)
        if self.verbose:
            print base + " execution on engine(s): %s" % str_targets
        
        result = self.view.execute(cell, silent=False, block=False)
        self.last_result = result
        
        if save_name:
            self.shell.user_ns[save_name] = result
        
        if block:
            result.get()
            result.display_outputs(groupby)
        else:
            # return AsyncResult only on non-blocking submission
            return result
def parallel_execute(self, cell, block=None, groupby='type', save_name=None):
        # defaults:
        block = self.view.block if block is None else block
        
        base = "Parallel" if block else "Async parallel"
        
        targets = self.view.targets
        if isinstance(targets, list) and len(targets) > 10:
            str_targets = str(targets[:4])[:-1] + ', ..., ' + str(targets[-4:])[1:]
        else:
            str_targets = str(targets)
        if self.verbose:
            print base + " execution on engine(s): %s" % str_targets
        
        result = self.view.execute(cell, silent=False, block=False)
        self.last_result = result
        
        if save_name:
            self.shell.user_ns[save_name] = result
        
        if block:
            result.get()
            result.display_outputs(groupby)
        else:
            # return AsyncResult only on non-blocking submission
            return result
def parallel_execute ( self , cell , block = None , groupby = 'type' , save_name = None ) : # defaults: block = self . view . block if block is None else block base = "Parallel" if block else "Async parallel" targets = self . view . targets if isinstance ( targets , list ) and len ( targets ) > 10 : str_targets = str ( targets [ : 4 ] ) [ : - 1 ] + ', ..., ' + str ( targets [ - 4 : ] ) [ 1 : ] else : str_targets = str ( targets ) if self . verbose : print base + " execution on engine(s): %s" % str_targets result = self . view . execute ( cell , silent = False , block = False ) self . last_result = result if save_name : self . shell . user_ns [ save_name ] = result if block : result . get ( ) result . display_outputs ( groupby ) else : # return AsyncResult only on non-blocking submission return result
implementation used by %px and %%parallel
implementation used by %px and %%parallel