Skip to main content

Write python language in chinese

Project description

Introduction

“If it walks like a duck and quacks like a duck, I would call it a duck.”

Zhpy acts like python and play like python, you (chinese users) could use it as python.

Zhpy is the full feature python language with fully tested chinese keywords, variables, and parameters support. Independent on python version, bundle with command line tool, chinese shell script capability, interpreter, pluggable keyword system, bi-directional zhpy <-> python code translation, and great document.

Zhpy on python is good for Taiwan and China beginners to learn python in our native language (Traditional and Simplified chinese).

The core of zhpy is a lightweight python module and a chinese source convertor based on python, which provides interpreter and command line tool to translate zhpy code to python.

zhpy integrated a setuptools-based plugin system and in-place ini reference feature for keyword reuse.

The zhpy code written in traditional and simplified chinese could be translated and converted to natual python code. Thus it could be execute as nature python code and be used in normal python programs.

Normal python programs could be translated to traditional(.twpy) or simplified(.cnpy) chinese zhpy source via ‘zhpy’ command line tool.

You could use ‘zhpy’ command instead of “python” in command line to execute source code wrote in either Chinese or English.

Zhpy also provide a method ‘zh_exec’ that allow you to embed chinese script in python; Zhpy could be used as the chinese shell script as well.

Check examples here.

Install

You could use easy_install command to install or upgrade zhpy:

$ easy_install -U zhpy

or check instructions for detail.

Usage

You could use zhpy interpreter to test zhpy:

$ zhpy
zhpy [version] in [platform] on top of Python [py_version]
>>> print 'hello in chinese'
hello in chinese

Browse project homepage to get examples in chinese.

check the BasicUsage for detail.

Programming Guide

An C.C licensed zhpy book “A Byte of Zhpy” is available on site. You could freely view it online.

The book is based on “A Byte of python”.

There’s the API document available in zhpy download list, too.

Change Log

You could view the ChangeLog to see what’s new in these version.

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

zhpy-1.2.zip (58.2 kB view details)

Uploaded Source

Built Distribution

zhpy-1.2-py2.5.egg (64.5 kB view details)

Uploaded Source

File details

Details for the file zhpy-1.2.zip.

File metadata

  • Download URL: zhpy-1.2.zip
  • Upload date:
  • Size: 58.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zhpy-1.2.zip
Algorithm Hash digest
SHA256 b71095caf6b971e86a4a1a519389e6fea14621f39e856ba03cb1b1905c052cb1
MD5 35dab958391fdeae8fef0ee63d8af65b
BLAKE2b-256 1a7f8786d4565b4c40a75032c15a55f18d56333e1e63aaa103c804ec4faba732

See more details on using hashes here.

File details

Details for the file zhpy-1.2-py2.5.egg.

File metadata

  • Download URL: zhpy-1.2-py2.5.egg
  • Upload date:
  • Size: 64.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zhpy-1.2-py2.5.egg
Algorithm Hash digest
SHA256 830897900a57b5ef8483036b68176d2e27edb4c3918f1b2e1957a14cb0e3184f
MD5 c0d8684a479307e6cde1a8c4df18a70e
BLAKE2b-256 4b980de36296f5bfc470edcc2d46cbeaf877509d2d9100fd3f01e9fc87aa17ad

See more details on using hashes here.

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