Skip to main content

字节跳动风格延迟逐元素打印库,支持字符串/容器,毫秒/秒模式切换 | ByteDance-style delayed element-wise printing library

Project description

欢迎使用BytePrint库 / Welcome to the BytePrint library

备注:英文版在后面 / Note: English version is at the back

中文版 / Chinese version

这是一个BytepPrint库,一个建立在Python之上的BytePrint库

它比较轻便,但功能齐全

支持的类型很多,比如字符串(str),列表(list),元组(tuple),字典(dict)等类型,非常丰富

并且存在别名内置简写函数

支持毫秒或秒的延迟模式

完善的参数检测以及双语提示

还不需要其他依赖

支持help()文档模式

BytePrint库,缩写bp,中文名“字节打印”

推荐的导入方式是:

import byteprints as bp

采用双语制作:中文,英文

支持版本:Python >= 3.6

重要提示:

byteprints不建议与byteprint库在一起,容易冲突!

(byteprints注册为byteprints,byteprint注册为byteprint)

备注:byteprint在2025年发布的,本库继承原byteprint库,延续证书年份(2025)

使用方法:

  1. 初步使用

    import byteprints as bp
    bp.bd("Hello, BytePrint")
    

    显然,使用方法非常的简单

    毕竟这只是初步,没有那么的复杂,

  2. 分类的使用

    最早的时候,sbd是最先出现的

    sbd全名是string_byte_dance,字符串打印

    没错,最初本来打算命名为字节跳动(ByteDance)

    但是已经有人抢了,因此起名字节打印(BytePrint)

    sbd本质就是把任何输入转换为字符串类型进行打印

    cbd就是container_byte_dance,容器打印,不过有错误的地方,就是:

    • 这个类型不支持不可迭代的数

    所以容易被嫌弃,不过可能在某些地方会用到吧...

  3. REPL环境

    这个库配备了REPL环境

    还有类似exec的执行

    这就是execute函数

    支持执行字符串,比如

    import byteprints as bp
    bp.execute("bd('Hello, BytePrint')")
    

    当然,如果输入是这样的话,是进入REPL

    有三种方式:

    import byteprints as bp
    
    # 1. 空输入
    bp.execute()
    
    # 2. 输入空白
    bp.execute(None)
    
    # 3. 输入布尔值
    bp.execute(False)
    bp.execute(True)
    

    至于有啥用?实践就知道!

  4. 如何反馈

    你想反馈的话,邮件已经给了

    如果你不想用,BytePrint内置了feedback

    不过,需要的参数让你直呼无语!

    你可以通过:

    import byteprints as bp
    help(bp.feedback)
    

    查看参数,肯定会让你懵逼的!

    并且bp内置helps,可以试试!

  5. 内置的检测系统 REPL是内置了自动更新系统

    如果你想阻止,可以通过CTRL+C打断,来直接进行REPL 你可以:

    • 通过again函数重新安装
    • 通过upgrade函数进行升级
    • 通过versions进行查看版本
    • 通过install进行安装指定版本

    这都是可以的

  6. 参数

    看过帮助文档的都知道,

    BytePrint库有参数

    参数主要是

    • c (content) 内容
    • s (speed) 速度
    • e (end) 结尾
    • m (ms_mode) 毫秒模式
    • p (separated) 分隔 (仅限 容器打印)

    没错,如此离谱,真的很离谱!

备注

  1. 本库对Window兼容性太差

    因为Window不支持ANSI,需要专门的渲染颜色机制

    不过目前还没找到在不使用额外依赖库的方法下给Window渲染的方法

    因此,暂时没有解决方法

  2. 内置的命令

    本库内置了命令byteprint

    你可以通过byteprint -h获得帮助

暂时没有其他的了,后面的你们继续探索!




English version / 英文版

This is a BytePrint library, a BytePrint library built on top of Python.

It's relatively light, but fully functional,

There are many supported types, such as string (str), list (list), tuple (tuple), dictionary (dictionary) and other types, which are very rich!

And there are alias built-in shorthand functions,

Supports milliseconds or seconds delay mode,

Complete parameter testing and bilingual prompts,

No other dependence is needed yet!

Support help() document mode

BytePrint library, abbreviated as bp, and its Chinese name is "Byte Print",

The recommended import methods are:

import byteprints as bp

Produced in bilingual: Chinese, English

Supported versions: Python >= 3.6

Important Tips:

Byteprint is not recommended with the byteprint library, it is easy to conflict!

(Byteprints are registered as byteprints, byteprint is registered as byteprint

Note: byteprint was released in 2025. This library inherits the original byteprint library and continues the certificate year (2025)

Usage method:

  1. preliminary use

    import byteprints as bp
    bp.bd("Hello, BytePrint")
    

    Obviously, the method of use is very simple,

    After all, this is only preliminary and not that complicated

  2. classified utilization At the earliest time, sbd was the first to appear

    The full name of sbd is string_byte_dance, and the string is printed.

    Yes, originally intended to be ** ByteDance **,

    But someone had already robbed it, so they named it ** BytePrint **.

    The essence of sbd is to convert any input into a string type for printing,

    cbd is container_byte_dance, container printing, but there is an error:

    • This type does not support non-iterable numbers

    So it is easy to be disliked, but it may be used in some places..

  3. REPL Environment This library is equipped with a REPL environment

    There are also exec-like implementations

    This is the execute function

    Supports execution strings, such as

    import byteprints as bp
    bp.execute("bd('Hello, BytePrint')")
    

    Of course, if the input is like this, it is to enter REPL

    There are three ways:

    import byteprints as bp
    
    # 1. empty input
    bp.execute()
    
    # 2. Enter blank
    bp.execute(None)
    
    # 3. Enter Boolean value
    bp.execute(False)
    bp.execute(True)
    

    As for what is the use? Practice will know!

  4. How to give feedback If you want feedback, you have already sent it an email.

    If you t want to use it, Print has built-in feedback,

    However, the required parameters make you speechless!

    You can:

    import byteprints as bp
    help(bp.feedback)
    

    Check the parameters and you will definitely be confused!

    And bp has built-in helps, you can try it

  5. Built-in detection system REPL has a built-in automatic update system,

    If you want to stop it, you can interrupt directly by CTRL+C to perform REPL.

    You can:

    • Reinstall through the again function
    • Upgrade through the upgrade function
    • View version via versions
    • Install via install Specify version

    This is all possible

  6. parameters Anyone who has read the help document knows that

    BytePrint library has parameters

    The parameters are mainly

    • c (content) content
    • s (speed)
    • e (end) ends
    • m (ms_mode) milliseconds mode
    • p (separated)(container printing only)

    That's right, it's so outrageous, it's really outrageous!

Notes

  1. This library is too compatible with Windows

    Because Window does not support ANSI, a special rendering color mechanism is needed

    However, there is no way to render Windows without using additional dependent libraries

    Therefore, there is no solution for the time being

  2. built-in command

    This library has a built-in command byteprint

    You can get help through byteprint -h

There is nothing else for the time being. Continue to explore later!

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

byteprints-1.3.0rc8.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

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

byteprints-1.3.0rc8-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

Details for the file byteprints-1.3.0rc8.tar.gz.

File metadata

  • Download URL: byteprints-1.3.0rc8.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for byteprints-1.3.0rc8.tar.gz
Algorithm Hash digest
SHA256 4fbba22510e122c7242ca2bbfa81a07e955f70a095229f02fd87e37749a59721
MD5 78c00fd87c3d67bec657cbb7d447a831
BLAKE2b-256 ad23a01354ce2879506df1632722b1f67e56ee514a5d2d332e951047f27c5ad1

See more details on using hashes here.

File details

Details for the file byteprints-1.3.0rc8-py3-none-any.whl.

File metadata

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

File hashes

Hashes for byteprints-1.3.0rc8-py3-none-any.whl
Algorithm Hash digest
SHA256 ff6b3ec887d8091e6475f94bb4918471186560b477507d42fef6fb93737d8eb8
MD5 af36c27bbb39d35843172871ec515459
BLAKE2b-256 7c60c0d2fc9d857ffffbfb77f18f342ebec3fa88b9acabc0b416a67fa5227373

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