Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
iTerm2 Triggers for Python

About

You can colorize Python messages in iTerm by adding triggers to your profile.

Go to

iTerm > Settings > Profiles > Triggers > Edit

Triggers

Highlight Text - Traceback calls:
Traceback([\s\S]*)

Highlight Text - line and number:
line [\d]*

Highlight Text - errors:

(BaseException|Exception|StandardError|ArithmeticError|BufferError|LookupError|EnvironmentError|AssertionError|AttributeError|EOFError|FloatingPointError|GeneratorExit|IOError|ImportError|IndexError|KeyError|KeyboardInterrupt|MemoryError|NameError|NotImplementedError|OSError|OverflowError|ReferenceError|RuntimeError|StopIteration|SyntaxError|IndentationError|TabError|SystemError|SystemExit|TypeError|UnboundLocalError|UnicodeError|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|ValueError|VMSError|WindowsError|ZeroDivisionError|Warning|UserWarning|DeprecationWarning|PendingDeprecationWarning|SyntaxWarning|RuntimeWarning|FutureWarning|ImportWarning|UnicodeWarning)(.*)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment