pyclips icon indicating copy to clipboard operation
pyclips copied to clipboard

Python CFFI bindings for CLIPS

Open noxdafox opened this issue 6 years ago • 4 comments

Greetings,

few years ago, I wrote a lightweight wrapper for CLIPS API in ctypes to overcome some issues with PyCLIPS (most important a memory leak).

Lately I decided to redo the entire work using Python CFFI which is much simpler and performant. The great advantage of such approach, compared to the standard Python extensions, is the small amount of necessary boilerplate code.

This will make transitions to CLIPS 6.40/6.50 APIs much simpler.

The library borrows a lot from PyCLIPS design but differs in few ways.

  • Python 2, 3 and PyPy support
  • No embedded CLIPS library, use the locally installed one
  • A more Pythonic API (no CamelCase functions, use of properties and generators...)
  • A more modular design
  • Very simple Python-to-CLIPS data conversion model
  • No string commands manipulation, only the C APIs were wrapped

I was wondering if the PyCLIPS community was interested in this project and if we could, one day, merge the efforts.

I just shared the code here.

noxdafox avatar Sep 24 '17 19:09 noxdafox