Skip to main content

Write python language in chinese

Project description

zhpy is the full feature python with chinese keywords, variables, and parameters support.

zhpy on python is good for Taiwan and China beginners to learn python in our native language.

zhpy is a lightweight python module and a chinese source convertor on python, which provides interpreter and command line tool to translate zhpy code to python. The python code written by traditional and simplified chinese could be translated and execute as nature python code.

zhpy support full python syntax. Code written in zhpy could be converted to natual python and be used in normal python programs.

zhpy provide interpreter, which allow execise zhpy and python interactivily.

zhpy provide a method ‘zh_exec’ that allow to embed chinese script in python, zhpy could be used as the chinese script in shell as well.

zhpy is fully tested, which use ~60 test cases to test the small(<10k) source.

zhpy use pyparsing module to detect chinese keywords, class name, methods, arguments, variables 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.

Usage

You could use zhpy interpreter to test zhpy:

$ zhpy
>>> print 'hello in chinese'
hello in chinese

Browse project homepage to get examples in chinese.

check the BasicUsage for detail.

Programming

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

Reserved keywords are listed here

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-0.8.1.zip (38.2 kB view details)

Uploaded Source

Built Distribution

zhpy-0.8.1-py2.5.egg (47.2 kB view details)

Uploaded Source

File details

Details for the file zhpy-0.8.1.zip.

File metadata

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

File hashes

Hashes for zhpy-0.8.1.zip
Algorithm Hash digest
SHA256 31366f021172b4cf0cdbce8599192eb774fc85c31eec32c09d2277c73b3bd9f8
MD5 ad3d6eb54c21fd4f92c8b3b7be336a4d
BLAKE2b-256 e91a894de1beb2810758eb096450cfc57856f52b1157b822c8b6a554561a4cb2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zhpy-0.8.1-py2.5.egg
Algorithm Hash digest
SHA256 01289e633c62743bf4338d866039633a741fbef733812598919b8d88494bb25c
MD5 6fea002ec9bcc7dec2c8dc9d14d06fa0
BLAKE2b-256 1b9aa932e5d62cbf039b09b819eb170691599051fc6aa48a3910ea8b1dd8bec6

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