Skip to main content

TextUI colors for Python.

Project description

This module is really simple, it gives you colored strings for terminal usage. Included colors are red, green, yellow, blue, black, magenta, magenta, cyan, white, clean, and disable.

Features

  • If you call disable(), all future calls to colors will be ignored.

  • If the current process is not in a TTY (e.g. being piped), no colors will be displayed.

  • Length of ColoredStrings can be properly calculated.

  • Powered by colorama.

Usage is simple

# red is red, white is white.
>>> print '{red} white'.format(red=crayons.red('red'))
red white

That’s it!

Installation

$ pip install crayons

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crayons-0.1.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

crayons-0.1.1-py2-none-any.whl (4.1 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page