Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christimperley/comby-python
Python bindings for Comby
https://github.com/christimperley/comby-python
comby program-transformation python-bindings syntax-rewriter
Last synced: 2 months ago
JSON representation
Python bindings for Comby
- Host: GitHub
- URL: https://github.com/christimperley/comby-python
- Owner: ChrisTimperley
- License: mit
- Created: 2018-04-16T17:50:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-07T23:22:57.000Z (about 1 year ago)
- Last Synced: 2024-08-09T03:06:52.162Z (5 months ago)
- Topics: comby, program-transformation, python-bindings, syntax-rewriter
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
.. -*-restructuredtext-*-
comby-python
============.. image:: https://travis-ci.org/ChrisTimperley/comby-python.svg?branch=master
:target: https://travis-ci.org/ChrisTimperley/comby-python.. image:: https://badge.fury.io/py/comby.svg
:target: https://badge.fury.io/py/comby.. image:: https://img.shields.io/pypi/pyversions/comby.svg
:target: https://pypi.org/project/combyPython bindings for `Comby `_.
Installation
------------Comby must be installed: https://github.com/comby-tools/comby
To install the latest release from PyPI:
.. code:: shell
$ pip install comby
or to install from source:
.. code:: shell
$ pip install .
Getting Started
---------------To perform a basic match-rewrite on a given source text:
.. code:: python
from comby import Comby
comby = Comby()
match = 'print :[[1]]'
rewrite = 'print(:[1])'
source_old = 'print "hello world"'
source_new = comby.rewrite(source_old, match, rewrite)
# -> 'print("hello world")