ansi color output defined by tags within the output
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ansitagcolor-0.2.2-1.tar.gz
(8.1 kB
view details)
Built Distributions
File details
Details for the file ansitagcolor-0.2.2-1.tar.gz
.
File metadata
- Download URL: ansitagcolor-0.2.2-1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88ad07ebf58a653e9802414a318836385bfc2bb2686f8318e16336a77601db9d |
|
MD5 | a50ee3eb7bcabfb854a8b9374fb78dd9 |
|
BLAKE2b-256 | d602f2bc83349b97827e6b8f3820b25771ddd4bb4b78522afef9db8758f39e26 |
File details
Details for the file ansitagcolor-0.2.2-1.linux-x86_64.tar.gz
.
File metadata
- Download URL: ansitagcolor-0.2.2-1.linux-x86_64.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45fb6c466035dbe16066631bc271db725ea2505f2c21480a3f25e41192fe2ea9 |
|
MD5 | 9c129b016ab7b2f4cdd78d8d64cf0db7 |
|
BLAKE2b-256 | f6921246448116886f7a95494064f4355a568efad9658dbf133d2242063de156 |
File details
Details for the file ansitagcolor-0.2.2-1.linux-x86_64.exe
.
File metadata
- Download URL: ansitagcolor-0.2.2-1.linux-x86_64.exe
- Upload date:
- Size: 66.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9767d19e23b9b7e0fd788b4006393581d1b7ee06e9c1deb9cc8653fd88f1ec7f |
|
MD5 | d64a3ba2fe5a5c4d3b9083b0ffc2bdad |
|
BLAKE2b-256 | ad012387782f8138389716cd5ae60f254978cf601779c8e9244db9ca429ad5b0 |