(self, filename=None)
Override Interactive Interpreter method: Use Colorizing

        Color the offending position instead of printing it and pointing at it
        with a caret.
Override Interactive Interpreter method: Use Colorizing
Override Interactive Interpreter method : Use Colorizing
def showsyntaxerror(self, filename=None):
        """Override Interactive Interpreter method: Use Colorizing

        Color the offending position instead of printing it and pointing at it
        with a caret.

        """
        tkconsole = self.tkconsole
        text = tkconsole.text
        text.tag_remove("ERROR", "1.0", "end")
        type, value, tb = sys.exc_info()
        msg = getattr(value, 'msg', '') or value or "<no detail available>"
        lineno = getattr(value, 'lineno', '') or 1
        offset = getattr(value, 'offset', '') or 0
        if offset == 0:
            lineno += 1 #mark end of offending line
        if lineno == 1:
            pos = "iomark + %d chars" % (offset-1)
        else:
            pos = "iomark linestart + %d lines + %d chars" % \
                  (lineno-1, offset-1)
        tkconsole.colorize_syntax_error(text, pos)
        tkconsole.resetoutput()
        self.write("SyntaxError: %s\n" % msg)
        tkconsole.showprompt()
def showsyntaxerror ( self , filename = None ) : tkconsole = self . tkconsole text = tkconsole . text text . tag_remove ( "ERROR" , "1.0" , "end" ) type , value , tb = sys . exc_info ( ) msg = getattr ( value , 'msg' , '' ) or value or "<no detail available>" lineno = getattr ( value , 'lineno' , '' ) or 1 offset = getattr ( value , 'offset' , '' ) or 0 if offset == 0 : lineno += 1 #mark end of offending line if lineno == 1 : pos = "iomark + %d chars" % ( offset - 1 ) else : pos = "iomark linestart + %d lines + %d chars" % ( lineno - 1 , offset - 1 ) tkconsole . colorize_syntax_error ( text , pos ) tkconsole . resetoutput ( ) self . write ( "SyntaxError: %s\n" % msg ) tkconsole . showprompt ( )