https://github.com/hellerve/pyzepto
A crude way of interfacing Python with zepto
https://github.com/hellerve/pyzepto
Last synced: 12 months ago
JSON representation
A crude way of interfacing Python with zepto
- Host: GitHub
- URL: https://github.com/hellerve/pyzepto
- Owner: hellerve
- Created: 2016-06-21T16:22:31.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-21T16:38:39.000Z (almost 10 years ago)
- Last Synced: 2025-02-12T05:11:58.077Z (about 1 year ago)
- Language: Python
- Size: 1.95 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
pyzepto
=======
A crude way of interfacing zepto and Python.
Requirements
============
You need to have zepto_ installed.
.. _zepto: https://github.com/hellerve/zepto
Installation
============
::
pip install pyzepto
Usage
=====
I really advise against using it. It's amazingly crude.
But if you really want to do this, it's relatively straight-forward.
The main function that is exposed by this package is ``zepto``. It
takes a string of zepto code and evaluates it, returning the return
value as a string.
.. code-block:: python
from pyzepto import zepto
zepto("(+ 1 2 3)") # => "6"
zepto("(make-byte-vector 10 0)") # => "b{0 0 0 0 0 0 0 0 0 0}"
I also implemented a custom module loader for your convenience,
so you can import zepto files into Python using regular ``import``
statements. What could possibly go wrong?