Skip to main content

Write python language in chinese

Project description

zhpy is python on Chinese, which good for Taiwan and China beginners to learn python in their native language.

zhpy is a lightweight python module and a source convertor, which provides a command line tool to translate python code. The python code written by traditional and simplified chinese would be translated to nature python code (english).

zhpy use pyparsing module to detect chinese keywords, class name, methods, arguments, v ariables and translate them back to python.

It’s possible for developers to port zhpy to python on korean or python on japenese.

Check examples here.

Install zhpy

You could use easy_install command to install zhpy:

$ easy_install zhpy

or check instructions for detail.


You could use ‘zhpy’ command instead of “python” in command line to execute source code mixed in Chinese and English.:

$ zhpy
hello, world!

You could assign a file name to export the zhpy source to the normal python source (english):

$ zhpy

Then run the exported file as normal python source:

$ python
hello, world!


You could mix original english keywords and Chinese keywords in your zhpy source.

Reserved keywords are listed here

Project details

Download files

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

Files for zhpy, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size zhpy-0.3-py2.5.egg (10.5 kB) File type Egg Python version 2.5 Upload date Hashes View
Filename, size (16.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page