Bind complete cairo using python-ctypes

Hi,

I am using cairo-pycairo(1.8.10), python 2.6.5 and wxpython. wxpython
using
pycairo(_cairo.pyd) and wx.lib.wxcairo.(some functions are wrapped
using ctypes)

Is it possible to bind cairo entirely using ctypes?

Development of pycairo is bit slower then of cairo. Building cairo
from sources
is easier (win and linux) but in order to wrap new functionality in
pycairo, you
have to port it and build again. This would be a bit difficult if you
don't have
much of c/c++ experience. If cairo bindings can be made only using
python-ctypes
then you have to build only cairo and call new functionality using
ctypes in
your python script.

I am not an expert in c/c++ so have some patience with me.

Prashan

Probably. You would end up with essentially a mirror of the C API though, and would lose some of the "Pythonic" things that pycairo adds, like being able to treat the cairo objects as classes rather than simple pointers, management of the destruction of cairo objects when the Python reference goes away, etc.

···

On 8/27/10 10:22 AM, King wrote:

Hi,

I am using cairo-pycairo(1.8.10), python 2.6.5 and wxpython. wxpython
using
pycairo(_cairo.pyd) and wx.lib.wxcairo.(some functions are wrapped
using ctypes)

Is it possible to bind cairo entirely using ctypes?

--
Robin Dunn
Software Craftsman