Python Highlighter¶
QSyntaxHighlighter for Python syntax.
-
class
bci_framework.framework.editor.highlighters.python_syntax.
PythonHighlighter
(document)[source]¶ Syntax highlighter for the Python language.
-
classmethod
get_format
(color, style='', fontsize=None)[source]¶ Return a QTextCharFormat with the given attributes.
-
match_multiline
(text, delimiter, in_state, style)[source]¶ Do highlighting of multi-line strings.
delimiter
should be aQRegularExpression
for triple-single-quotes or triple-double-quotes, andin_state
should be a unique integer to represent the corresponding state changes when inside those strings. Returns True if we’re still inside a multi-line string when this function is finished.
-
property
styles
¶ The styles depend on the theme.
-
classmethod