https://packages.python.org/sphinxcontrib-ansi
A Sphinx extension, which turns ANSI color sequences in Sphinx documents into colored HTML output.
This extension can be installed from the Python Package Index:
pip install sphinxcontrib-ansi
Alternatively, you can clone the sphinx-contrib repository from BitBucket, and install the extension directly from the repository:
hg clone https://bitbucket.org/birkenfeld/sphinx-contrib cd sphinx-contrib/ansi python setup.py install
Please refer to the documentation for further information.