Skip to main content

write python in Hebrew

Project description

hebrew-python

hebrew-python is a python library (with commandline utities) for programming python in Hebrew. (Yes, it is really possible!)

hebrew-python runs in Python 3.6+ (because ideas runs in Python 3.6+)

After downloading this library you can write a script like:

מתוך בנוי.אקראי יבא מספר_אקראי
משתנה_כלשהו = מספר_אקראי(1,9)
הראה(משתנה_כלשהו)

Name the file something.hepy and run it with hepy something.hepy.

You can also import other .hepy and .py files from the main file:

יבא something

Installing

To install with pip type in terminal:

(sudo) pip install hebrew-python

This will create the commandline script:hepy

Usage

You can run hepy files with hepy <file>

You can start Hebrew Python console with just hepy

.hepy file syntax

.hepy file supports hebrew python syntax (syntax with keywords like יבא(import)
and functions like הראה (print)) in additional to normal python syntax

Use from normal python file/repl

You can use as library:

to import .hepy files into your .py file:

from hebrew_python import create_hook
create_hook(run_module=False, console=False) # without running main module or starting repl
import hepy_module # now you can import .hepy files

or to start repl from normal repl:

from hebrew_python import create_hook
create_hook(run_module=True, console=True) # *with* starting repl

jupyter/ipython

hebrew-python support jupyter and ipython intercative console by ipython extension. to use:

install jupyter-notebook by : pip install notebook
start jupyter-notebook by : jupyter notebook. then create new python3 by the new button.

on the first cell enter the text %load_ext hebrew_python and pross contoll+enter.

and then you can write hebrew-python in all notebook

Dependencies

hebrew-python depends on the python libraries:

friendly - for more friendly english traceback

  • ideas - most of this library is built on this project. It support easy creation of import hooks and it has a simple example for replacing keywords to French keywords

Contribute

On all errors, problems or suggestions please open a github issue

If you found this library useful, it would be great if you could buy me a coffee:

Buy Me A Coffee

Author

matan h

License

This project is licensed under the BSD-4 License.

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

hebrew_python-0.1.4.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hebrew_python-0.1.4-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file hebrew_python-0.1.4.tar.gz.

File metadata

  • Download URL: hebrew_python-0.1.4.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.6 Windows/10

File hashes

Hashes for hebrew_python-0.1.4.tar.gz
Algorithm Hash digest
SHA256 834d04eb440ae10a3821cfe3e4034b26ac490ca6ed9a25a29852b4d35e9810ec
MD5 1fc68797d3137c101146d605565658f7
BLAKE2b-256 4d0aebf542ad156d65edb076ebd1ab1fcad543625520da8b63862d33bdd9f252

See more details on using hashes here.

File details

Details for the file hebrew_python-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: hebrew_python-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.6 Windows/10

File hashes

Hashes for hebrew_python-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 74a48e3334004fc314313ae3ad34373102993f053f22bd9e01bf5f121fa4b696
MD5 37f9024d24a717bf03affbdba4b6a920
BLAKE2b-256 f46d650b55c10521fc0ee20ef48b467dd7be7e258a2fdcb819ef6c3f68f5a2bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page