Python: SWIG vs ctypes

后端 未结 10 1595
无人共我
无人共我 2020-12-04 08:37

In python, under what circumstances is SWIG a better choice than ctypes for calling entry points in shared libraries? Let\'s assume you don\'t already have the SWIG interfac

10条回答
  •  旧时难觅i
    2020-12-04 09:04

    You can also use Pyrex, which can act as glue between high-level Python code and low-level C code. lxml is written in Pyrex, for instance.

提交回复
热议问题