Ansicolors 最小示例

ansicolors_example.py
from colors import black, red, blue

# 打印红色示例
print(red("test"))

# 打印粗体示例
print(black("test", style="bold"))

使用以下命令安装库

install_ansicolors.sh
pip install -U ansicolors

Check out similar posts by category: Python