The Zen of Python 中文版,彩色输出
Project description
zen_zh
The Zen of Python 中文版(彩色输出)
本项目提供 Python Zen of Python 的中文翻译,支持在 import 时自动打印禅意,同时提供函数接口可重复调用。
中文翻译已发布到公共领域(CC0 1.0),可自由使用、修改、分发。
安装
使用 pip 安装(本地开发或测试版):
pip install -e .
pip install zen_zh
使用方法
1. 自动打印
import zen_zh
导入后会自动打印中文禅意,彩色显示。
2. 调用函数再次打印
import zen_zh
# 调用顶层函数再次打印
zen_zh.print_zen()
3. 获取单行禅意
from zen_zh import zen_lines
line = zen_lines(1) # 获取第一条禅意
print(line)
目录结构
zen_zh/
├── src/zen_zh
│ ├── __init__.py
│ ├── __main__.py
│ └── data.py
├── LICENSE
├── README.md
└── pyproject.toml
许可证
The Zen of Python (Original English Text) is in the public domain. Original author: Tim Peters. Translate author: hygroupseries.
中文翻译也发布到公共领域(CC0 1.0 Universal)。 可自由使用、修改、分发,包括商业用途,无需许可。
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zen_zh-0.1.0.tar.gz.
File metadata
- Download URL: zen_zh-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7161135cf195d5b6149e034e6de4d174b43bc6d17b211080ea00671a4381b2f2
|
|
| MD5 |
3c166776225e1c89b013133160f872d5
|
|
| BLAKE2b-256 |
f9f351666610df906278c06a723a92673ddec5bc9e0fddb1331ffb14e308558b
|
File details
Details for the file zen_zh-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zen_zh-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e67e676ba76065c1795947229bf17920ab089f5718995d307338d941a33c5b18
|
|
| MD5 |
54f8a613341dcd71dde601209ef66577
|
|
| BLAKE2b-256 |
32f95f1fc9258e992f247f59105e39d1b090e6c7b8f60a38b8ac4578852aaf8f
|