ansicon
Python wrapper for loading Jason Hood's ANSICON
What it is and what it does
ansicon is a Python wrapper around Jason Hood's ANSICON, a Windows console utility that enables ANSI escape sequence support for colored and styled terminal output. On Windows, standard terminal applications often do not interpret ANSI color codes natively, so this wrapper loads ANSICON to bridge that gap and allow terminal color code usage.
The package provides three main functions: load() to activate ANSICON, unload() to deactivate it, and loaded() to check its current state. It is designed for developers who write terminal applications with ANSI color codes and need those codes to work on Windows without rewriting their output logic. However, the package has been abandoned since its latest release on 2019-04-29 and receives no active maintenance, making it a legacy tool primarily useful for maintaining older Windows console applications.
Use it for:
- Enable ANSI color codes in legacy Windows console applications that were written for cross-platform terminal output.
- Add colored output to Python CLI tools running on Windows without rewriting color logic for platform-specific APIs.
- Support terminal styling in Windows batch or PowerShell-invoked Python scripts.
- Maintain existing codebases that depend on ANSICON and cannot migrate to alternative approaches.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Enables ANSI color and style codes in Windows console output by wrapping Jason Hood's ANSICON tool, allowing terminal color support.
No, unless you are maintaining legacy Windows console code that already depends on this package. The project is abandoned (last release 2019-04-29, no commits since 2023-04-13), and modern alternatives are better choices for new projects. The copyleft license also adds friction if you need to modify it.
Install
ansicon on PyPI
pip
pip install ansiconuv
uv add ansiconpoetry
poetry add ansiconInstalling ansicon
Before you install
Installation is frictionless with no runtime dependencies, but the package is abandoned—last release was 2019-04-29 and no commits since 2023-04-13. Use only if you need legacy Windows console color support and are comfortable maintaining a frozen dependency.
License in practice
Licensed under MPLv2.0 (copyleft), which requires that modifications to this package be shared under the same license, though use of the package itself in your code does not impose restrictions.
Quickstart
pip install ansicon
import ansicon
ansicon.load()
print(u'\x1b[32mGreen\x1b[m')
ansicon.unload()
Windows-only; requires ANSICON binary to be installed or available on the system for the wrapper to function.
Verify before relying
- Whether ANSICON binary is bundled with the package or must be installed separately on the target Windows system.
- Compatibility with Python versions beyond those listed in classifiers (3.7 and earlier).
- Whether the package works with current Windows console implementations.
Package facts
| License | MPLv2.0 (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,664 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 672,211/month — #5,401 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ansicon-1.89.0-py2.py3-none-any.whl
Keywords: ansicon, terminal, console
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
ansicolorsEmbeds ANSI color and style codes into Python…
permissive · top 5,000 on PyPI
colorclassProvides ANSI color text output for console…
permissive · top 5,000 on PyPI
coloredColored provides ANSI/VT100 escape sequences…
permissive · top 5,000 on PyPI
ansiProvides ANSI escape codes for cursor movement…
permissive · top 15,000 on PyPI
crayonsCrayons provides colored text output for…
permissive · top 15,000 on PyPI
termcolorAdds ANSI color and text formatting (bold,…
permissive · top 1,000 on PyPI
coloramaColorama makes ANSI escape sequences for…
permissive · top 100 on PyPI
styleApplies ANSI color and text styling to terminal…
permissive · top 15,000 on PyPI
tcolorpyApplies ANSI true color and text styles (bold,…
permissive · top 5,000 on PyPI
strip-ansiRemoves ANSI escape sequences (color codes,…
unclear · top 15,000 on PyPI