Write python language in chinese
zhpy is an toy convertor to translate chinese (Traditional and Simplified) python code to nature python code (english).
zhpy use pyparsing to detect chinese keywords, class name, methods, arguments, variables and translate them back to python.
zhpy refactored the origin code from HYRY.
Check examples here.
You could use easy_install command to install zhpy:
$ easy_install zhpy
You could use zhpy instead of python in command line:
$ 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!
You could mix original english keywords and Chinese keywords in your zhpy source.
Reserved keywords are listed here
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size zhpy-0.2-py2.5.egg (10.4 kB)||File type Egg||Python version 2.5||Upload date||Hashes View|
|Filename, size zhpy-0.2.zip (7.5 kB)||File type Source||Python version None||Upload date||Hashes View|