Skip to main content

Introduction

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

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

Zhpy acts like python and play like python, you (chinese users) could use it as python to educate yourself the program skills plus with your native language.

Check examples here.

(Please install python 2.x to use this project)

Play locally

To play zhpy locally, you even don’t need to install it.

All you need to do is follow the 3 steps guide:

  1. Download the source pack (the zip file)

  2. Extract the pack with zip tool. Enter the folder

  3. Run:

    $ python interpreter.py

Then you got the usable zhpy interpreter!

Install

If you’d like to play zhpy with full features, you should install zhpy.

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

You could freely view the C.C. licensed book “A Byte of python (Zhpy)” on zhpy website, which contained zhpy example codes as well.

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

PS: The book is based on “A Byte of Python”.

What is Zhpy

Zhpy is the full feature python language with fully tested chinese keywords, variables, and parameters support. Zhpy is INDEPENDENT on python version(2.4, 2.5….), bundle with command line tool, interpreter, bi-directional zhpy <-> python code translation, chinese shell script capability, in-place ini reference feature for keyword reuse, and great document (the book Byte of Python with chinese examples).

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.

See http://www.flickr.com/photos/gasolin/2064120327

You could invoke interpreter with ‘zhpy’ command instead of “python” in command line to execute source code wrote in either Chinese or English. The zhpy interpreter also support autocomplete function to save your typing.

Zhpy 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.

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.

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

The framework is not hard to extend to another languages such as japenese or korean.

Change Log

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

Release files for zhpy 1.7.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zhpy 1.7.4
File Size Uploaded
zhpy-1.7.4.zip 68.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zhpy 1.7.4
File Interpreter ABI Platform
zhpy-1.7.4-py2.7.egg Legacy Egg format - - Details

Total release size: 212.0 kB

Release files / zhpy-1.7.4.zip

Download URL zhpy-1.7.4.zip
Size 68.4 kB
Tags Source
SHA-256 checksum
How to use checksums
02dc3c52358aa1b812b5bee38a13e9e722315ff523526baa95f10692f58bafb0
BLAKE2b-256 checksum
How to use checksums
c444e91152b7b917fe57910c73482115ab598d4dd4a668348190abab447213a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zhpy-1.7.4-py2.7.egg

Download URL zhpy-1.7.4-py2.7.egg
Size 143.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
2a0fe25d27f7e2f1f07ea9dac9369ab28a1b500f082b73b3cbf5793f418636da
BLAKE2b-256 checksum
How to use checksums
1896bf7e68f5a8f7f7049e46484662e685560b183686e7e0d09e2c4118df63e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.7.4 This release

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7

2 release files

1.6

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1.1

2 release files

1.1

2 release files

1.0

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9

2 release files

0.8.1

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page