Skip to main content

支持各种趣味打印的 Python 工具库

Reason this release was yanked:

from InterestPrint import * has bug

Project description

InterestPrint 趣味打印库

作者: 袁窦涵 邮箱: w111251@outlook.com

功能介绍

一款支持跨平台彩色打印、趣味喵喵环绕打印的 Python 工具库,轻量无第三方依赖,开箱即用。

函数说明

colorful_print

带颜色的终端打印函数,支持 Windows/Linux/macOS 三大主流系统,可选字体颜色、加粗效果。

  • 参数:*text(打印内容,支持多参数传入)、color(字体颜色,默认值:white)、bold(是否加粗,默认值:False)、end(结尾字符,默认值: )、sep(多参数分隔符,默认值:空格)
  • 支持颜色:black/red/green/yellow/blue/purple/cyan/white

front_back_print

可设置前后缀的打印

  • 参数:*text 要打印的内容(可变参数)、front: 前缀(默认^)、back: 后缀(\EQUALTOFRONT的意思是前后缀相同)、end 结尾字符,默认换行、sep 多个参数的分隔符,默认空格

meow_print

带猫咪表情(🐱)环绕的趣味打印函数,可自定义前后喵表情数量、是否显示前后表情。

  • 参数:*text(打印内容,支持多参数传入)、meow_count(喵表情数量,默认值:1)、end(结尾字符,默认值: )、sep(多参数分隔符,默认值:空格)、front(是否前置喵表情,默认值:True)、back(是否后置喵表情,默认值:True)

bg_colorful_print

带背景颜色的终端打印函数,支持 Windows/Linux/macOS 三大主流系统,默认白色字体,可选背景颜色、加粗效果。

  • 参数:*text(打印内容,支持多参数传入)、bg_color(背景颜色,默认值:black)、end(结尾字符,默认值: )、sep(多参数分隔符,默认值:空格)、bold(是否加粗,默认值:False)
  • 支持背景颜色:black/red/green/yellow/blue/purple/cyan/white

fg_and_bg_colorful_print

同时设置前景色(字体色)和背景色的终端打印函数,支持 Windows/Linux/macOS 三大主流系统,灵活搭配字体色与背景色。

  • 参数:*text(打印内容,支持多参数传入)、fg_color(前景色/字体色,默认值:white)、bg_color(背景颜色,默认值:black)、end(结尾字符,默认值: )、sep(多参数分隔符,默认值:空格)
  • 支持颜色:black/red/green/yellow/blue/purple/cyan/white

fg_colorful_print

colorful_print 的别名(Alias),功能与 colorful_print 完全一致,语义更直观(Fg 对应 Foreground,前景色/字体色)。

print_then_clear

打印后清屏函数,支持自定义显示时间。

  • 参数:*text(打印内容,支持多参数传入)、show_time(显示时间,单位秒,默认值:3)、color(字体颜色,默认值:white)、bold(是否加粗,默认值:False)、end(结尾字符,默认值: )、sep(多参数分隔符,默认值:空格)

disable_meow_print

禁用 MeowPrint 函数。

enable_meow_print

启用 MeowPrint 函数。

colorful_input

带颜色的终端输入函数,支持 Windows/Linux/macOS 三大主流系统,可选字体颜色、加粗效果。

  • 参数:prompt(输入提示信息,默认值:空字符串)、color(字体颜色,默认值:white)、bold(是否加粗,默认值:False)
  • 支持颜色:black/red/green/yellow/blue/purple/cyan/white

tstr

自定义字符串类,添加t-string风格安全插值方法

rainbow_print

彩虹打印函数,支持自定义颜色、加粗效果。

  • 参数:*text(打印内容,支持多参数传入)、colors(字体颜色列表,默认值:['red', 'yellow', 'green', 'cyan', 'blue', 'purple'])、bold(是否加粗,默认值:False)、end(结尾字符,默认值: )、sep(多参数分隔符,默认值:空格)
  • 支持颜色:black/red/green/yellow/blue/purple/cyan/white

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

interestprint-0.7.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

interestprint-0.7.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file interestprint-0.7.0.tar.gz.

File metadata

  • Download URL: interestprint-0.7.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for interestprint-0.7.0.tar.gz
Algorithm Hash digest
SHA256 5c11ae44e5b86c67e7f8efea333d707c7164e7256457dd9db1a155dd0922d0be
MD5 38c4d6bdcb1adb08ef98263a32f0bb1f
BLAKE2b-256 0425ab03f97bfcd53c1d0a16e398ecf21c60d8a0c56179a37c96698831e6a49f

See more details on using hashes here.

File details

Details for the file interestprint-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: interestprint-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for interestprint-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3fa822522b707b04e5fad6e7ae898766ee226af22879879e1d94bc8919e31f9
MD5 21833ed8f8a29229c8e391431140f37f
BLAKE2b-256 31e4cfa7dc733a362f6bbae1893429e5263fe853a71a0028a7f69dd03ab67207

See more details on using hashes here.

Supported by

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