Colored Traceback

0.4.2 · active · verified Thu Apr 16

Colored-traceback is a Python library that automatically colors uncaught exception tracebacks, aiming to improve readability in the terminal. The project is currently active, with its latest release (0.4.2) on July 13, 2024, but has an infrequent release cadence.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to activate colored tracebacks by simply importing `colored_traceback.auto`. Running this script will cause a `ZeroDivisionError` and display a colorized traceback in your terminal.

import colored_traceback.auto

def cause_error():
    return 1 / 0

def main():
    print("Attempting to cause an error...")
    cause_error()

if __name__ == "__main__":
    main()

view raw JSON →