environment/lib/python2.7/site-packages/IPython/frontend/qt/console/ipython_widget.py
def _process_execute_error(self, msg):
        """ Reimplemented for IPython-style traceback formatting.
        """
        content = msg['content']
        traceback = '\n'.join(content['traceback']) + '\n'
        if False:
            # FIXME: For now, tracebacks come as plain text, so we can't use
            # the html renderer yet.  Once we refactor ultratb to produce
            # properly styled tracebacks, this branch should be the default
            traceback = traceback.replace(' ', '&nbsp;')
            traceback = traceback.replace('\n', '<br/>')

            ename = content['ename']
            ename_styled = '<span class="error">%s</span>' % ename
            traceback = traceback.replace(ename, ename_styled)

            self._append_html(traceback)
        else:
            # This is the fallback for now, using plain text with ansi escapes
            self._append_plain_text(traceback)
def _process_execute_error(self, msg):
        """ Reimplemented for IPython-style traceback formatting.
        """
        content = msg['content']
        traceback = '\n'.join(content['traceback']) + '\n'
        if False:
            # FIXME: For now, tracebacks come as plain text, so we can't use
            # the html renderer yet.  Once we refactor ultratb to produce
            # properly styled tracebacks, this branch should be the default
            traceback = traceback.replace(' ', '&nbsp;')
            traceback = traceback.replace('\n', '<br/>')

            ename = content['ename']
            ename_styled = '<span class="error">%s</span>' % ename
            traceback = traceback.replace(ename, ename_styled)

            self._append_html(traceback)
        else:
            # This is the fallback for now, using plain text with ansi escapes
            self._append_plain_text(traceback)
def _process_execute_error ( self , msg ) : content = msg [ 'content' ] traceback = '\n' . join ( content [ 'traceback' ] ) + '\n' if False : # FIXME: For now, tracebacks come as plain text, so we can't use # the html renderer yet.  Once we refactor ultratb to produce # properly styled tracebacks, this branch should be the default traceback = traceback . replace ( ' ' , '&nbsp;' ) traceback = traceback . replace ( '\n' , '<br/>' ) ename = content [ 'ename' ] ename_styled = '<span class="error">%s</span>' % ename traceback = traceback . replace ( ename , ename_styled ) self . _append_html ( traceback ) else : # This is the fallback for now, using plain text with ansi escapes self . _append_plain_text ( traceback )
Reimplemented for IPython-style traceback formatting.
Reimplemented for IPython - style traceback formatting .