Installation¶
TL;DR: install this module and script in one command with pip:
pip install ansicolortags
Dependencies¶
The project is entirely written in pure Python, supporting both version 2 (2.7+) and version 3 (3.1+). It has no dependencies except a Python interpreter! For more details about the Python language, see its official website.
How to install it ?¶
There is three different ways:
1. Directly, with pip¶
The preferred way is to install ansicolortags
directly with pip
(what is pip?):
$ pip install ansicolortags
On GNU/Linux, it might be necessary to give it sudo rights:
$ sudo pip install ansicolortags
If you have both Python 2 and 3, and if you want to use the module from both,
be sure to install it with both pip2
and pip3
:
$ sudo pip2 install ansicolortags # For Python 2 (v2.7+)
$ sudo pip3 install ansicolortags # For Pythoh 3 (v3.1+)
2. Download, extract, and use setup.py
¶
Or you can also follow these 4 steps:
download the file ansicolortags.tar.gz from Bitbucket, or from PyPi (if needed, it is signed numerically with my PGP key);
extract it (with
tar xzfv
, or a graphical solution, like File Roller);then go in the subdirectory (
cd ansicolortags-0.4/
);and finally install it with Python distutils
setup.py
tool:$ python setup.py installOr maybe with sudo rights, if the first try did not work :
$ sudo python setup.py installFor more information, runpython setup.py help
orpython setup.py install help
.
3. Without installing it¶
Note that installation is not mandatory :
a third solution is to simply include JUST the file ansicolortags.py
,
and embed it in your own projects.
The project can be used without installing anything elsewhere.