environment/lib/python2.7/site-packages/IPython/parallel/client/magics.py
def pxrun_cell(self, raw_cell, store_history=False, silent=False):
        """drop-in replacement for InteractiveShell.run_cell.

        This executes code remotely, instead of in the local namespace.

        See InteractiveShell.run_cell for details.
        """

        if (not raw_cell) or raw_cell.isspace():
            return

        ipself = self.shell

        with ipself.builtin_trap:
            cell = ipself.prefilter_manager.prefilter_lines(raw_cell)

            # Store raw and processed history
            if store_history:
                ipself.history_manager.store_inputs(ipself.execution_count,
                                                  cell, raw_cell)

            # ipself.logger.log(cell, raw_cell)

            cell_name = ipself.compile.cache(cell, ipself.execution_count)

            try:
                ast.parse(cell, filename=cell_name)
            except (OverflowError, SyntaxError, ValueError, TypeError,
                    MemoryError):
                # Case 1
                ipself.showsyntaxerror()
                ipself.execution_count += 1
                return None
            except NameError:
                # ignore name errors, because we don't know the remote keys
                pass

        if store_history:
            # Write output to the database. Does nothing unless
            # history output logging is enabled.
            ipself.history_manager.store_output(ipself.execution_count)
            # Each cell is a *single* input, regardless of how many lines it has
            ipself.execution_count += 1
        if re.search(r'get_ipython\(\)\.magic\(u?["\']%?autopx', cell):
            self._disable_autopx()
            return False
        else:
            try:
                result = self.view.execute(cell, silent=False, block=False)
            except:
                ipself.showtraceback()
                return True
            else:
                if self.view.block:
                    try:
                        result.get()
                    except:
                        self.shell.showtraceback()
                        return True
                    else:
                        with ipself.builtin_trap:
                            result.display_outputs()
                return False
def pxrun_cell(self, raw_cell, store_history=False, silent=False):
        if (not raw_cell) or raw_cell.isspace():
            return

        ipself = self.shell

        with ipself.builtin_trap:
            cell = ipself.prefilter_manager.prefilter_lines(raw_cell)

            # Store raw and processed history
            if store_history:
                ipself.history_manager.store_inputs(ipself.execution_count,
                                                  cell, raw_cell)

            # ipself.logger.log(cell, raw_cell)

            cell_name = ipself.compile.cache(cell, ipself.execution_count)

            try:
                ast.parse(cell, filename=cell_name)
            except (OverflowError, SyntaxError, ValueError, TypeError,
                    MemoryError):
                # Case 1
                ipself.showsyntaxerror()
                ipself.execution_count += 1
                return None
            except NameError:
                # ignore name errors, because we don't know the remote keys
                pass

        if store_history:
            # Write output to the database. Does nothing unless
            # history output logging is enabled.
            ipself.history_manager.store_output(ipself.execution_count)
            # Each cell is a *single* input, regardless of how many lines it has
            ipself.execution_count += 1
        if re.search(r'get_ipython\(\)\.magic\(u?["\']%?autopx', cell):
            self._disable_autopx()
            return False
        else:
            try:
                result = self.view.execute(cell, silent=False, block=False)
            except:
                ipself.showtraceback()
                return True
            else:
                if self.view.block:
                    try:
                        result.get()
                    except:
                        self.shell.showtraceback()
                        return True
                    else:
                        with ipself.builtin_trap:
                            result.display_outputs()
                return False
def pxrun_cell ( self , raw_cell , store_history = False , silent = False ) : if ( not raw_cell ) or raw_cell . isspace ( ) : return ipself = self . shell with ipself . builtin_trap : cell = ipself . prefilter_manager . prefilter_lines ( raw_cell ) # Store raw and processed history if store_history : ipself . history_manager . store_inputs ( ipself . execution_count , cell , raw_cell ) # ipself.logger.log(cell, raw_cell) cell_name = ipself . compile . cache ( cell , ipself . execution_count ) try : ast . parse ( cell , filename = cell_name ) except ( OverflowError , SyntaxError , ValueError , TypeError , MemoryError ) : # Case 1 ipself . showsyntaxerror ( ) ipself . execution_count += 1 return None except NameError : # ignore name errors, because we don't know the remote keys pass if store_history : # Write output to the database. Does nothing unless # history output logging is enabled. ipself . history_manager . store_output ( ipself . execution_count ) # Each cell is a *single* input, regardless of how many lines it has ipself . execution_count += 1 if re . search ( r'get_ipython\(\)\.magic\(u?["\']%?autopx' , cell ) : self . _disable_autopx ( ) return False else : try : result = self . view . execute ( cell , silent = False , block = False ) except : ipself . showtraceback ( ) return True else : if self . view . block : try : result . get ( ) except : self . shell . showtraceback ( ) return True else : with ipself . builtin_trap : result . display_outputs ( ) return False
drop-in replacement for InteractiveShell.run_cell.

        This executes code remotely, instead of in the local namespace.

        See InteractiveShell.run_cell for details.
drop - in replacement for InteractiveShell . run_cell .