Better Crayons: Text UI colors for Python.
This module is really simple, it gives you colored strings for terminal
usage. Included colors are red, green, yellow, blue, black, magenta, cyan, white, and normal ( as well as clean and disable).
Better Crayons is nice because it automatically wraps a given string in both the foreground color, as well as returning to the original state after the string is complete. Most terminal color libraries make you manage this yourself.
Arguments include always=True and bold=True.
Features
- If you call
disable(), all future calls to colors will be ignored. - If you call
normal(), color is reset to default foreground color - 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('{} white'.format(better_crayons.red('red')))
red white
That's it!
Installation
$ pip install better_crayons
Metadata
Release files for better-crayons 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| better_crayons-0.0.2.tar.gz | 2.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| better_crayons-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.1 kB
Release files / better_crayons-0.0.2.tar.gz
| Download URL | better_crayons-0.0.2.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1a617acf59c84c0a9523153085e3ba4433e6da7baabcbf2918c83606d11f9cb
|
|
BLAKE2b-256 checksum How to use checksums |
1b02f7c002813be06cce5d02f20b95f018061b1ce4317d20ca00477a1935b7dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7
|
Release files / better_crayons-0.0.2-py3-none-any.whl
| Download URL | better_crayons-0.0.2-py3-none-any.whl |
|---|---|
| Size | 2.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5807eb743d79dba5a9ff9e39f4a46af2adf17f2a9ae5b359e3330b0e46729cb8
|
|
BLAKE2b-256 checksum How to use checksums |
902dcfc8c944a942ed010ad44bdc195907765ee59273bfc6e603a0011208212b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7
|