diff options
author | Martin Matusiak <numerodix@gmail.com> | 2014-03-08 19:14:53 +0100 |
---|---|---|
committer | Martin Matusiak <numerodix@gmail.com> | 2014-03-08 19:14:53 +0100 |
commit | e2a06e100ac6110e567a3b7b5fe13fc1353485ef (patch) | |
tree | 0729780717effc6486a26e59eba968dd913a8dd4 /README.rst | |
parent | 28b4021e385e0f078c48f049bbba19323c1373db (diff) | |
download | ansicolor-e2a06e100ac6110e567a3b7b5fe13fc1353485ef.tar.gz |
expand readme
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -10,15 +10,37 @@ ansicolor .. image:: https://pypip.in/wheel/ansicolor/badge.png :target: https://pypi.python.org/pypi/ansicolor/ -Runs on: +Supported platforms: - CPython 2.6, 2.7, 3.2, 3.3 - PyPy +Introduction +------------ + +`ansicolor` is a library that makes it easy to use ansi color markup in command +line programs. + + Installation ------------ .. code:: bash $ pip install ansicolor + + +Simple color markup +------------------- + +.. code:: python + + from ansicolor import green + from ansicolor import red + from ansicolor import white + + print("Let's try two colors: %s and %s!" % (red("red"), green("green"))) + print("It's also easy to produce text in %s," % (red("bold", bold=True))) + print("...%s," % (green("reverse", reverse=True))) + print("...and %s." % (cyan("bold and reverse", bold=True, reverse=True))) |