Skip to main content

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


Download files

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

Source Distribution

zen_zh-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

zen_zh-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

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

Hashes for zen_zh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7161135cf195d5b6149e034e6de4d174b43bc6d17b211080ea00671a4381b2f2
MD5 3c166776225e1c89b013133160f872d5
BLAKE2b-256 f9f351666610df906278c06a723a92673ddec5bc9e0fddb1331ffb14e308558b

See more details on using hashes here.

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

Hashes for zen_zh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e67e676ba76065c1795947229bf17920ab089f5718995d307338d941a33c5b18
MD5 54f8a613341dcd71dde601209ef66577
BLAKE2b-256 32f95f1fc9258e992f247f59105e39d1b090e6c7b8f60a38b8ac4578852aaf8f

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