Skip to main content

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


Download files

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

Files for c-print, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size c_print-1.0.1-py3-none-any.whl (14.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size c-print-1.0.1.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page