[pybsddb] Pyrex Bindings (was: Repication API of BDB)
jcea at argo.es
Mon Apr 7 21:19:21 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Davies Liu wrote:
| Because of lack of replication API, I try to build BDB Python extension
| usign Pyrex , it's really usefully.
| I just copyd the define of consts and public handlers of structs
| directly from "db.h", then did some replacements,
| I had almost imported all the API of BDB. What i need to do was write
| some function wrappers,
| to deal with arguments convertions and errors, and Pyrex can do most of
I'm impressed. Very.
I had considered a pyrex wrapper myself, months ago. When I became
maintainer I thought that gradually refining current pybsddb would serve
~ users better that throwing all the code and starting over, fresh. I
didn't discard it, in any case.
There are other issues, also. Originally pybsddb was started as a SWIG
wrapper. Later it was rewritten in pure C. I don't know the details or
the reason for that. Maybe Greg could comment about this.
Greg, are you out there?.
Also, pybsddb is included in standard Python and no other module is
writen in pyrex/SWIG. I don't know the reason, but I suspect they don't
like to add dependencies, foreign bugs and so on. Maybe would be a good
idea to just ask python-dev about this issue. I guess there is a real
and strong reason for that policy. In fact, the oficial way to link to C
code is "ctypes", that I find unuseable when the API requires
| Is it a better idea to use Pyrex instead of raw C code to get more
My experience with pybsddb maintenance, with a couple of months already
behind, is that current pybsddb code is useable and, in practice, I
spend far more time documenting and thinking/writing the test cases than
writing C. Those steps are needed too, even if the main core is Pyrex.
But one of my motives to move to Python, a decade ago, was to forget
about C programming. Life sucks :). Badly :)
I would like to use your creative force and initiative to improve
pybsddb. How are your C skills? :-).
Jesus Cea Avion _/_/ _/_/_/ _/_/_/
jcea at argo.es http://www.argo.es/~jcea/ _/_/ _/_/ _/_/ _/_/ _/_/
jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/
~ _/_/ _/_/ _/_/ _/_/ _/_/
"Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
"My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the pybsddb