Cpp + Python: static data dynamic initialization in *nix shared lib?

Alf P. Steinbach /Usenet alf.p.steinbach+usenet at gmail.com
Tue Jul 13 15:39:50 EDT 2010


* Robert Kern, on 13.07.2010 17:16:
> On 7/13/10 2:34 AM, Alf P. Steinbach /Usenet wrote:
>
>> PS: You (the reader) may be wondering, why why why Yet Another Python/C++
>> binding? Well, because I had this great name for it, "pyni", unfortunately
>> already in use. But cppy is very different from Boost: Boost is large,  cppy is
>> tiny; Boost has as main goal to expose arbitrary C++ code to Python, automating
>> argument conversion etc., while with cppy your Python design is exposed to C++
>> with no enforced arg conversions and such; Boost relies on canned magic,
>> difficult to subvert when it doesn't do what you want, while with cppy you are
>> (or, so far, I am) in control; and I suspect that the Boost Python binding,
>> relying on dynamic registries and stuff, is not all that efficient, while cppy
>> is as efficient as using the Python C API to create an extension. And besides,
>> cppy supports national characters in doc strings etc. And I'm Norwegian. So. :-)
>
> Note that Boost is not the only C++ binding out there. You may want to
> take a look at the old SCXX library, which appears to be similar in intent:
>
>   http://davidf.sjsoft.com/mirrors/mcmillan-inc/scxx.html
>
> matplotlib uses it heavily, and their included copy may include some
> more recent bugfixes and enhancements:
>
>   http://matplotlib.sourceforge.net/

Thanks! It seems that SCXX does those things that I've been planning to do but 
haven't got around to (wrapping standard Python types), while what it doesn't do 
(abstracting away all those tables etc. and mapping Python calls to C++ calls) 
is what I've been working on. Which could be a Very Nice combination except that 
I'm assuming Py3, while SCXX seems to be Py2 only. :-(


Cheers,

- Alf

-- 
blog at <url: http://alfps.wordpress.com>



More information about the Python-list mailing list