Small python package for printing text in different colours and typography.
Project description
cprint
Small python package for printing text in different colours and typography.
Installation
pip install c-print
Prerequisites
You need to have a Python2.7+ or Python3+ installation with the following libraries:
Usage
The cprint()
function simply adds one keyword argument, c
, to the python print()
function. This extra keyword argument can change the output of print()
to one colour and any number of given styles. Colours are given in lower case and styles in upper case. Any other keyword arguments are passed on to print()
.
Character | Colour |
---|---|
'k' | black |
'r' | red |
'g' | green |
'y' | yellow |
'b' | blue |
'm' | magenta |
'c' | cyan |
'w' | white |
Character | Style |
---|---|
'B' | bold |
'D' | dark |
'I' | italic |
'U' | underline |
'F' | flash |
'R' | reverse colour |
'C' | crossed through |
Example:
from cprint import cprint
cprint('Hello World!', c='rB')
cprint('Hello World!', 'Monty Python', c='bUI', end='!')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file c-print-1.0.1.tar.gz
.
File metadata
- Download URL: c-print-1.0.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.29.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c07c614b7a26297213935864ee1e6f22eaec7537ba783af5ab3429435675009 |
|
MD5 | 2db9d9dc8a783515dd314e359327959b |
|
BLAKE2b-256 | 33c902cae0c8314d0dc3b62af8753ef74ac6c736752be94cc7ca02f2171c49b4 |
File details
Details for the file c_print-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: c_print-1.0.1-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.29.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a521204c92093c25c3fc51236f960dc9c83c1cdabf398653344951a64ef272e |
|
MD5 | abfe8c13a5207986d4903d0cf8dd8e29 |
|
BLAKE2b-256 | 6741f06d9dee7f971feb1de8c498a1f5787331854933188de58958daff2cae99 |