Skip to main content

ansi color output defined by tags within the output

Project description

Build Status Coverage Status

The normal terminal color libraries provide an easy way to print text with colors and styles. _ansitagcolor_ provides a binding between a tag (e.g. error, warn, info) and a given style. Tags are registered at a term instance and text can be processed with term.cprint or replace the print with term.printr.

Author:  Alexander Weigl
License: MIT
Date:    2014-03-14
Version: 0.2

Getting Started

Install with pip:

pip install --user ansitagcolor

Run in python:

from __future__ import print_function
import ansitagcolor as ansi
t = ansi.term()
print = t.printr
t.register("error", style( foreground = ansi.Color16Table.White,
                           background = ansi.Color16Table.Red) )

print("{error Error Message!}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ansitagcolor, version 0.2.2-1
Filename, size File type Python version Upload date Hashes
Filename, size ansitagcolor-0.2.2-1.linux-x86_64.exe (66.8 kB) File type Windows Installer Python version any Upload date Hashes View
Filename, size ansitagcolor-0.2.2-1.linux-x86_64.tar.gz (7.2 kB) File type Dumb Binary Python version any Upload date Hashes View
Filename, size ansitagcolor-0.2.2-1.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page