It's a simple package for you to customize the printing color.
Project description
Colorprt
It's a simple package for you to customize the printing color.
Usage
pip install colorprt
from pycolorprint import colorprt, Back, Fore
colorprt("Hello World", background=Back.RED)
Back stands for background;Fore stands for foreground
Also, you can use a config class to print colored strings.
from pycolorprint import PyColorConfig, Mode, Back, Fore
pycolor_config = PyColorConfig(mode=Mode.BOLD, background=Back.DEFAULT, foreground=Fore.RED)
pycolor_config("I love You!!", end="")
If you just want the ansi colored formatted strings, you can use clrstr
class.
from pycolorprint import clrstr, Mode, Back, Fore, PyColorConfig
hate_print_config = PyColorConfig(mode=Mode.UNDER_LINE, background=Back.DEFAULT, foreground=Fore.YELLOW)
print(clrstr("I love You!!", mode=Mode.BOLD, background=Back.DEFAULT, foreground=Fore.RED)
+ clrstr("I hate you", hate_print_config))
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
colorprt-1.0.0.tar.gz
(2.4 kB
view hashes)