A Python library for rich terminal output with advanced logging features. It provides functionalities for styling text, creating progress bars, and handling advanced terminal interactions. The current version is 0.11.21, with active development featuring regular updates.
pip install ascii-colorsVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic text coloring, style chaining, background/foreground combinations, and the integrated logging features. It also includes an example of ASCII art generation.
Change `ASCIIColors.print_ascii_art(...)` to `ascii_colors.print_ascii_art(...)` or `ac.print_ascii_art(...)` if you use `import ascii_colors as ac`.
Refer to the latest documentation or source code for the correct logging configuration methods, e.g., use `set_log_level` instead of `set_logging_level`.
Always ensure output is directed to a compatible terminal emulator. For logging to files, use the library's built-in logging system which can be configured to strip ANSI codes when output is not a terminal (e.g., `ascii_colors.set_log_file()`).
Ensure the output is directed to a compatible terminal emulator (e.g., Windows Terminal, iTerm2). When logging to files, use `ascii_colors.set_log_file()` to automatically strip codes or ensure your log formatters handle it.
Update your code to call the function directly from the module: `ascii_colors.print_ascii_art(...)` (or `ac.print_ascii_art(...)` if using an alias).
Use a modern terminal emulator (e.g., Windows Terminal, Alacritty, iTerm2, Kitty, GNOME Terminal). Verify your terminal's settings to ensure ANSI color code interpretation is enabled.