## Python syntax highlighting syntax "python" "\.py$" header "^#!.*/python[-0-9._]*" ## default color white "^.+$" icolor brightwhite "[0-9a-z_]+" ## keywords color brightyellow "\<(and|as|assert|break|class|continue|def|del|elif|else)\>" color brightyellow "\<(except|exec|finally|for|from|global|if|import|in|is)\>" color brightyellow "\<(lambda|not|or|pass|print|raise|return|try|while|with|yield)\>" ## reserved classes of identifiers icolor brightred "\<_[0-9a-z_]*\>" ## smth color brightmagenta "\<(True|False|None)\>" ## numbers icolor brightcyan "\<(0|[1-9][0-9]*|0x[0-9a-f]+|0o[0-7]+|0[0-7]+|0b[01]+)L?\>" icolor brightcyan "\<([0-9]+\.?|[0-9]*\.[0-9]+)(e[+-]?[0-9]+)?j?\>" "\<[0-9]+j\>" ## strings icolor green "(b|u)?r?"(\\"|[^"])*"" icolor brightgreen "(b|u)?r?'(\'|[^'])*'" icolor brightgreen start="(b|u)?r?"""" end=""""" icolor green start="(b|u)?r?'''" end="'''" ## escapes color red "\\[0-7]{3}" "\\x[0-9a-fA-F]{2}" "\\u[0-9a-fA-F]{4}" "\\U[0-9a-fA-F]{8}" color red "\\[abfnrtv'"\\]" "\\N\{[0-9a-z_]+\}" ## comments color magenta "#.*" ## whitespace color ,green "[[:space:]]+$" color ,red "[[:cntrl:]]+"