Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 1.11 KB

colourise.rst

File metadata and controls

68 lines (46 loc) · 1.11 KB

jnrbase.colourise

colourise

Note

This module requires click, which pip users can install with the jnrbase[colour] requirement.

Constants

COLOUR

Functions

_colourise

Text formatting

fail

info

success

warn

Message formatting

pfail

pinfo

psuccess

pwarn

Examples

Text formatting

from jnrbase import colourise from jnrbase.colourise import fail, info, success, warn

colourise.COLOUR = False

>>> fail('Error!') 'Error!' >>> info('Cats are not dogs') 'Cats are not dogs' >>> success('Excellent') 'Excellent' >>> warn('Ick') 'Ick'