Skip to main content

输出彩色文字

Project description

cprints

安装说明

使用pip或其他 PyPi 软件包进行安装

pip install cprints

使用 cprints 输出彩色文本

您可以试试:

from cprints import cp


# 红色文字 文字样式: 下划线
cp.print_red("Hello World", style=cp.underline)

# 绿色文字 红色背景
cp.print_green("Hello World", bg="red")

# 黄色文字 黑色背景 文字样式: 下换线 and 高亮
cp.cprint(
    "Hello World",
    fg="yellow",
    bg=cp.black,
    style=["underline", "高亮"]
)

# color着色文字
# 黑色文字 白色背景 文字样式: 反显
text = cp.color("Hello World", fg=cp.black, bg=cp.white, style=cp.reverse)
print(text)

Project details


Download files

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

Source Distribution

cprints-1.0.7.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

cprints-1.0.7-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page