Skip to main content
Help us improve Python packaging – donate today!

Write python language in chinese

Project Description

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.

Install zhpy

You could use easy_install command to install zhpy:

$ easy_install zhpy

Usage

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!

Programming

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

Reserved keywords are listed here

Release history Release notifications

History Node

1.7.4

History Node

1.7.3.1

History Node

1.7.3

History Node

1.7.2

History Node

1.7.1

History Node

1.7

History Node

1.6

History Node

1.5.2

History Node

1.5.1

History Node

1.5

History Node

1.4

History Node

1.4b1

History Node

1.3

History Node

1.2

History Node

1.1.1

History Node

1.1

History Node

1.0

History Node

0.9.4

History Node

0.9.3

History Node

0.9.2

History Node

0.9.1

History Node

0.9

History Node

0.8.1

History Node

0.8

History Node

0.7

History Node

0.6

History Node

0.5

History Node

0.4

History Node

0.3

This version
History Node

0.2

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
zhpy-0.2-py2.5.egg (10.4 kB) Copy SHA256 hash SHA256 Egg 2.5 Aug 9, 2007
zhpy-0.2.zip (7.5 kB) Copy SHA256 hash SHA256 Source None Aug 9, 2007

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page