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 your 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 could be translated to nature python code (english).

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’ command instead of “python” in command line to execute source code mixed in Chinese and English.:

$ zhpy hello.py
hello, world!

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

$ zhpy hello.py nhello.py

Then run the exported file as normal python source:

$ python nhello.py
hello, world!

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.4.zip (18.1 kB view details)

Uploaded Source

Built Distribution

zhpy-0.4-py2.5.egg (12.7 kB view details)

Uploaded Source

File details

Details for the file zhpy-0.4.zip.

File metadata

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

File hashes

Hashes for zhpy-0.4.zip
Algorithm Hash digest
SHA256 f1cc1bbfbf80c584628280585ad3fdee4709f92ec8b2c9a054ade4fe63b628b8
MD5 ebd200d2a0fede5dca84a0d5d95ee3ad
BLAKE2b-256 892e240b559610648e62809d423ab4b8facc34c95e65fe9aa2bc84bbdf8b2243

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zhpy-0.4-py2.5.egg
Algorithm Hash digest
SHA256 74080d137c02b4c8c289453b9bbf84ec0c833448ebedf618f699623302f67cd5
MD5 708b6f5f780c5e179badefb32c2a6e2e
BLAKE2b-256 94fe4bff2ef6e6afd17678d33f83a667e7c90559cf6032fbc6b4965c7ec379b9

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