Wrapping or converting Perl module?
hancock at anansispaceworks.com
Wed Nov 3 14:59:15 CET 2004
Suppose you have found a really nice module that does what
you want (or will do, it still being in development), and
you don't want to waste a lot of duplicated effort, but
this module is in Perl rather than Python (and yes, the
author is not open to conversion -- already tried
that ;-) ).
If it were written in C, I'd have a couple of answers, such
as wrapping the module with a Pyrex module, or one of the
other means of adapting C modules to use with Python.
But I don't know what to do with Perl. For starters, should
I be thinking in terms of a wrapper (as with C), or would it
be smart to try to automatically translate the code.
I'm willing to do a little bit of development work on this,
but as I said, the original code is still being developed,
and I hate to waste a lot of effort by reinventing what
my colleague is doing. I'm willing to go as far as
collaborating with this person, and I'm pretty sure we can
share his work on the MySQL code embedded in his module,
but I'd like to be able to convert his logic, too.
(In fact it's http://www.disobey.com/noos/LibDB/ , which
is an FRBR compliant library for cataloging books and media.
Not to be confused with "libdb", which IIRC is the C
library for accessing the "Berkeley Database", I've been
meaning to point out the name collision to the author).
And if I do have to manually translate his code, is there
such a thing as a "Perl to Python" HOWTO or something along
those lines to help me do it?
Thanks for comments, (and BTW, nice to be back, I tried
using Usenet for awhile, but I don't seem to have a news
server anymore after switching ISPs, *sigh*).
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
More information about the Python-list