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 (plus with your native language).

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

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

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.

Check examples here.

Play before Install

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

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

  1. Download the source pack

  2. Extract the pack with zip tool

  3. Run:

    $ python interpreter.py

Then you got the usable zhpy interpreter!

Install

If you’d like play zhpy with more 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 zhpy book “A Byte of python (Zhpy)” on zhpy website.

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

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

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.5.1.zip (93.6 kB view details)

Uploaded Source

Built Distribution

zhpy-1.5.1-py2.5.egg (144.6 kB view details)

Uploaded Source

File details

Details for the file zhpy-1.5.1.zip.

File metadata

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

File hashes

Hashes for zhpy-1.5.1.zip
Algorithm Hash digest
SHA256 1ddca486e16ebbd645d9f1becbed2d9bc86731b42bc2b706bceb4f12c39ce5ca
MD5 96f2194cb11f81187ad2187e2beaeb6a
BLAKE2b-256 339c5eaf299118945d6c286dbc677fb0a92cecc780ce80027f42022db2a7e86d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zhpy-1.5.1-py2.5.egg
Algorithm Hash digest
SHA256 473e54b14df3ab4dede91a758471d29291e0a1facd1e0f59158d64c343abef87
MD5 100b39a7d115eac459ba95735004d57a
BLAKE2b-256 5bc7510a1d1e9521c26339b756da96bb37cb7405a46a3ac8942ad7357be65075

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