skillfed

colored-traceback

Automatically color uncaught exception tracebacks

colored-traceback v0.4.2 858.5K downloads/30d#4,881 on PyPI65
Permissive license ISC DORMANT released

What it is and what it does

Colored Traceback hooks into Python's exception display system to apply syntax highlighting and color to uncaught exception tracebacks, making them significantly easier to scan visually in the terminal. The package works by intercepting the default traceback formatter and applying color via pygments for syntax highlighting and colorama for cross-platform terminal support (especially on Windows, which lacks native ANSI escape sequence support).

You can activate it with a single import statement in your script or REPL, either as a one-liner (import colored_traceback.auto) or with explicit control (colored_traceback.add_hook()). It respects whether stderr is being piped to another process, suppressing color by default unless you explicitly pass always=True. The package also supports being run as a module wrapper (python -m colored_traceback somefile.py) to color tracebacks from external scripts without modifying them.

Use it for:

  • Debugging scripts interactively in the terminal where colored, visually distinct stack traces reduce cognitive load when scanning for the error origin.
  • Adding to a development environment startup file to automatically color all uncaught exceptions without modifying individual scripts.
  • Running third-party Python scripts with colored output by wrapping them (python -m colored_traceback script.py) without source modification.
  • Making exception output in CI/CD logs or terminal sessions more readable when reviewing test failures or production errors.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Automatically colors Python exception tracebacks in the terminal to make them easier to read and scan visually.

Yes, if you spend time debugging in the terminal. It's a low-friction, zero-configuration enhancement that makes exception tracebacks genuinely easier to read. The dormant maintenance is not a concern for a simple, stable utility—no security vulnerabilities are known, and the two dependencies (pygments, colorama) are mature and widely used. Install it if visual clarity in error output matters to your workflow.

Install

colored-traceback on PyPI

pip

pip install colored-traceback

uv

uv add colored-traceback

poetry

poetry add colored-traceback

Installing colored-traceback

Before you install

Low friction install with two lightweight runtime dependencies (pygments and colorama). Maintenance is dormant—last release was 2024-07-13, but the repository remains active and has not been archived.

License in practice

ISC license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

pip install colored-traceback

import colored_traceback
colored_traceback.add_hook()

# Or for a one-liner:
import colored_traceback.auto

Verify before relying

  • Whether the package works correctly with modern Python versions beyond 3.3, given the dormant maintenance status and age of classifiers.

Package facts

License ISC (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — pygments, colorama
Maintenance dormant — 762 days since the last release
Last repo commit
First released
Downloads 858,542/month — #4,881 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: colored_traceback-0.4.2-py3-none-any.whl

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: ISC License (ISCL)Natural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.3

Tags

colored traceback pythonsyntax highlight exception outputreadable python stack tracesterminal traceback coloringpretty print python errorscolorize exception tracebacks
debuggingterminal-ui

More Terminals packages