Python bindings by default

Derek Atkins warlord at MIT.EDU
Mon Mar 5 10:21:02 EST 2012


Stuart McGraw <smcg4191 at frii.com> writes:

> On 03/02/2012 01:17 PM, John Ralls wrote:
>>> What about using Python's ctypes module to create 
>>> the bindings rather than swig?  Such bindings would 
>>> be independent of the installed Python version I think
>>> at the cost of some runtime efficiency (which would 
>>> not matter if the called API takes relatively much 
>>> more time.)  I think the PyOpenGL bindings made this
>>> change a few years ago, at least in part, for the 
>>> same reason. (http://pyopengl.sourceforge.net/ctypes/development.html)
>> 
>> Patches welcome. ;-)
>
> That's a possibility but I was hoping for comments from 
> those more knowledgeable than me about the feasibility or 
> lack thereof of such an approach.  It would be unfortunate 
> for a gnucash neophyte like me to invest a lot of time in 
> such an attempt only to rediscover some known show-stopper.

Well, we were already using SWIG for the guile bindings, so we already
had a lot of infrastructure in place to generate bindings using swig.
Moreover, we could re-use some of the interface files and definitions
between guile and python.  So I don't think anyone even considered using
ctypes for this.

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-user mailing list