environment/lib/python2.7/site-packages/IPython/frontend/terminal/console/interactiveshell.py
def run_cell(self, cell, store_history=True):
        """Run a complete IPython cell.
        
        Parameters
        ----------
        cell : str
          The code (including IPython code such as %magic functions) to run.
        store_history : bool
          If True, the raw and translated cell will be stored in IPython's
          history. For user code calling back into IPython's machinery, this
          should be set to False.
        """
        if (not cell) or cell.isspace():
            return

        if cell.strip() == 'exit':
            # explicitly handle 'exit' command
            return self.ask_exit()

        self._executing = True
        # flush stale replies, which could have been ignored, due to missed heartbeats
        while self.km.shell_channel.msg_ready():
            self.km.shell_channel.get_msg()
        # shell_channel.execute takes 'hidden', which is the inverse of store_hist
        msg_id = self.km.shell_channel.execute(cell, not store_history)
        while not self.km.shell_channel.msg_ready() and self.km.is_alive:
            try:
                self.handle_stdin_request(timeout=0.05)
            except Empty:
                # display intermediate print statements, etc.
                self.handle_iopub()
                pass
        if self.km.shell_channel.msg_ready():
            self.handle_execute_reply(msg_id)
        self._executing = False
def run_cell(self, cell, store_history=True):
        """Run a complete IPython cell.
        
        Parameters
        ----------
        cell : str
          The code (including IPython code such as %magic functions) to run.
        store_history : bool
          If True, the raw and translated cell will be stored in IPython's
          history. For user code calling back into IPython's machinery, this
          should be set to False.
        """
        if (not cell) or cell.isspace():
            return

        if cell.strip() == 'exit':
            # explicitly handle 'exit' command
            return self.ask_exit()

        self._executing = True
        # flush stale replies, which could have been ignored, due to missed heartbeats
        while self.km.shell_channel.msg_ready():
            self.km.shell_channel.get_msg()
        # shell_channel.execute takes 'hidden', which is the inverse of store_hist
        msg_id = self.km.shell_channel.execute(cell, not store_history)
        while not self.km.shell_channel.msg_ready() and self.km.is_alive:
            try:
                self.handle_stdin_request(timeout=0.05)
            except Empty:
                # display intermediate print statements, etc.
                self.handle_iopub()
                pass
        if self.km.shell_channel.msg_ready():
            self.handle_execute_reply(msg_id)
        self._executing = False
def run_cell ( self , cell , store_history = True ) : if ( not cell ) or cell . isspace ( ) : return if cell . strip ( ) == 'exit' : # explicitly handle 'exit' command return self . ask_exit ( ) self . _executing = True # flush stale replies, which could have been ignored, due to missed heartbeats while self . km . shell_channel . msg_ready ( ) : self . km . shell_channel . get_msg ( ) # shell_channel.execute takes 'hidden', which is the inverse of store_hist msg_id = self . km . shell_channel . execute ( cell , not store_history ) while not self . km . shell_channel . msg_ready ( ) and self . km . is_alive : try : self . handle_stdin_request ( timeout = 0.05 ) except Empty : # display intermediate print statements, etc. self . handle_iopub ( ) pass if self . km . shell_channel . msg_ready ( ) : self . handle_execute_reply ( msg_id ) self . _executing = False
Run a complete IPython cell.
        
        Parameters
        ----------
        cell : str
          The code (including IPython code such as %magic functions) to run.
        store_history : bool
          If True, the raw and translated cell will be stored in IPython's
          history. For user code calling back into IPython's machinery, this
          should be set to False.
Run a complete IPython cell . Parameters ---------- cell : str The code ( including IPython code such as %magic functions ) to run . store_history : bool If True the raw and translated cell will be stored in IPython s history . For user code calling back into IPython s machinery this should be set to False .