def __init__(self, parent, color_scheme=None):
        """
        :param parent: parent document (QTextDocument)
        :param color_scheme: color scheme to use.
        """
        QtGui.QSyntaxHighlighter.__init__(self, parent)
        Mode.__init__(self)
        if not color_scheme:
            color_scheme = ColorScheme('qt')
        self._color_scheme = color_scheme
        self._spaces_ptrn = QtCore.QRegExp(r'[ \t]+')
        #: Fold detector. Set it to a valid FoldDetector to get code folding
        #: to work. Default is None
        self.fold_detector = None
        self.WHITESPACES = QtCore.QRegExp(r'\s+')
def __init__ ( self , parent , color_scheme = None ) : QtGui . QSyntaxHighlighter . __init__ ( self , parent ) Mode . __init__ ( self ) if not color_scheme : color_scheme = ColorScheme ( 'qt' ) self . _color_scheme = color_scheme self . _spaces_ptrn = QtCore . QRegExp ( r'[ \t]+' ) self . fold_detector = None self . WHITESPACES = QtCore . QRegExp ( r'\s+' )
:param parent: parent document (QTextDocument)
        :param color_scheme: color scheme to use.