Welcome to the documentation for ANSIColors-balises, a python 2 module to use ANSI colours in a terminal. This project is currently in version 1.9.9, release public. Last update of this doc was made 20/03/2013, 11h:41m:32s.
The main page of this little project is here on BitBucket.
The project is now hosted on Pypi, so a quick overview and the last release can be downloaded from PyPi.
See also
This is the main page of the doc for my project, but there are other resources on-line : This project is hosted on bitbucket, see here lbesson/ansi-colors. And it is also hosted here on my google site.
- The project is entirely written in Python, version 2.7.3.
- For more details about the Python language, see the official site.
Python 2.7.1 or higher is required.
Warning
But this script will not work with Python 3. A P3K compatible version is in progress !
There is three different way :
For instance, on GNU/Linux (or at least, with the most used Linux distribution), it can be installed with pip :
sudo pip install ANSIColors-balises
Or you can also :
download the file, from PyPi;
extract it (with tar xzfv, or a graphical solution like File Roller);
then go in the subdirectory (cd ANSIColors-balises-v2.0.something/);
and finally with Python distutils setup tool:
$ python setup.py installOr maybe with sudo rights, if the first try doesn’t work :
$ sudo python setup.py install
The main function of this module is printc. This function is like print("my string") or sys.stdout.write("my other string").
For instance, a quick description of super heroes’s costums can be done like this :
>>> printc("<reset><white>Batman's costum is <black>black<white>, Aquaman's costum is <blue>blue<white> and <green>green<white>, and Superman's costum is <red>red<white> and <blue>blue<white> ...")
Batman's costum is black, Aquaman's costum is blue and green, and Superman's costum is red and blue ...
Sorry, but it is hard to embed colours in a Sphinx generated web pages.
This show the help of the script, colored with the tools defined in the script :
And, a detailed description of every function is available on the documentation of the module ANSIColors.
The main author of this little project is Lilian Besson. I’m a French student at ÉNS de Cachan, currently I’m doing two MSc Mathematics and computer science (CS).
For the complete license, see this file.
ANSIColors & ANSIColors-balises Copyright (C) 2012-13 Lilian Besson
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.