def __init__(self, editor, syntax=None, theme=None): QtGui.QSyntaxHighlighter.__init__(self, editor) self.editor = editor self.processor = PMXSyntaxProcessor(editor) self.syntax = syntax self.theme = theme #Highlight Function self.highlight_function = self.realtime_highlight self.highlightTask = self.editor.application.scheduler.idleTask() #Conect signals self.editor.afterOpen.connect(self.on_editor_afterOpen)