environment/lib/python2.7/site-packages/IPython/frontend/qt/console/ipython_widget.py
def _handle_pyout(self, msg):
        """ Reimplemented for IPython-style "display hook".
        """
        self.log.debug("pyout: %s", msg.get('content', ''))
        if not self._hidden and self._is_from_this_session(msg):
            content = msg['content']
            prompt_number = content.get('execution_count', 0)
            data = content['data']
            if data.has_key('text/html'):
                self._append_plain_text(self.output_sep, True)
                self._append_html(self._make_out_prompt(prompt_number), True)
                html = data['text/html']
                self._append_plain_text('\n', True)
                self._append_html(html + self.output_sep2, True)
            elif data.has_key('text/plain'):
                self._append_plain_text(self.output_sep, True)
                self._append_html(self._make_out_prompt(prompt_number), True)
                text = data['text/plain']
                # If the repr is multiline, make sure we start on a new line,
                # so that its lines are aligned.
                if "\n" in text and not self.output_sep.endswith("\n"):
                    self._append_plain_text('\n', True)
                self._append_plain_text(text + self.output_sep2, True)
def _handle_pyout(self, msg):
        """ Reimplemented for IPython-style "display hook".
        """
        self.log.debug("pyout: %s", msg.get('content', ''))
        if not self._hidden and self._is_from_this_session(msg):
            content = msg['content']
            prompt_number = content.get('execution_count', 0)
            data = content['data']
            if data.has_key('text/html'):
                self._append_plain_text(self.output_sep, True)
                self._append_html(self._make_out_prompt(prompt_number), True)
                html = data['text/html']
                self._append_plain_text('\n', True)
                self._append_html(html + self.output_sep2, True)
            elif data.has_key('text/plain'):
                self._append_plain_text(self.output_sep, True)
                self._append_html(self._make_out_prompt(prompt_number), True)
                text = data['text/plain']
                # If the repr is multiline, make sure we start on a new line,
                # so that its lines are aligned.
                if "\n" in text and not self.output_sep.endswith("\n"):
                    self._append_plain_text('\n', True)
                self._append_plain_text(text + self.output_sep2, True)
def _handle_pyout ( self , msg ) : self . log . debug ( "pyout: %s" , msg . get ( 'content' , '' ) ) if not self . _hidden and self . _is_from_this_session ( msg ) : content = msg [ 'content' ] prompt_number = content . get ( 'execution_count' , 0 ) data = content [ 'data' ] if data . has_key ( 'text/html' ) : self . _append_plain_text ( self . output_sep , True ) self . _append_html ( self . _make_out_prompt ( prompt_number ) , True ) html = data [ 'text/html' ] self . _append_plain_text ( '\n' , True ) self . _append_html ( html + self . output_sep2 , True ) elif data . has_key ( 'text/plain' ) : self . _append_plain_text ( self . output_sep , True ) self . _append_html ( self . _make_out_prompt ( prompt_number ) , True ) text = data [ 'text/plain' ] # If the repr is multiline, make sure we start on a new line, # so that its lines are aligned. if "\n" in text and not self . output_sep . endswith ( "\n" ) : self . _append_plain_text ( '\n' , True ) self . _append_plain_text ( text + self . output_sep2 , True )
Reimplemented for IPython-style "display hook".
Reimplemented for IPython - style display hook .