Python bindings for Comby.
Comby must be installed: https://github.com/comby-tools/comby
To install the latest release from PyPI:
$ pip install comby
or to install from source:
$ pip install .
To perform a basic match-rewrite on a given source text:
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")