A simple Python module to colorize your Linux terminal
Project description
clicolors - Command Line Interface::Colors
Usage:
>>> from clicolors import colorize
Example 1
>>> print colorize('Example text 1', fg='blue',bg='red',attr='bold')
Example 2
>>> print colorize('Example text 2', 'blue','red','bold')
Example 3
>>> print colorize('Example text 3', fg='yellow')
Example 4
>>> print colorize('Example text 4', 'yellow')
Example 5
>>> print colorize('Example text 5', bg='green')
Example 6
>>> print colorize('Example text 6',attr='underline')
Example 7
>>> print colorize('Example text 6',bg='cyan',attr='underline',fg='black')
Example: clicolors Demo
>>> from clicolors import colorize, COLORS, ATTRIBUTES
>>> print colorize('clicolors : A simple Python module to colorize your Linux terminal',fg='black',bg='white',attr='underline')
>>> print ('Foreground: '+' '.join([colorize(color, fg=color) for color in COLORS]))
>>> print ('Background: '+' '.join([colorize(color, bg=color) for color in COLORS]))
>>> print ('Attributes: '+' '.join([colorize(attributes, attr=attributes) for attributes in ATTRIBUTES]))
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
clicolors-0.2.tar.gz
(2.2 kB
view details)
File details
Details for the file clicolors-0.2.tar.gz.
File metadata
- Download URL: clicolors-0.2.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d96fd43177d88cebe1c8c47cb7b31d102ef25ce7f1a9d40e992ef8907e85ab0
|
|
| MD5 |
6362137046122f1bc8b3f8dc843072ad
|
|
| BLAKE2b-256 |
20533def5a4a25b0b3c00cc6d8b2e1bbcdd0a2d0ed8c1d2b5bd416fbcad2bd51
|