[ale] [OT] Calling Python from C ABI compatible languages
Michael B. Trausch
mike at trausch.us
Thu Sep 23 15:05:40 EDT 2010
I know that this is technically off-topic for this list. However, I'm
faced with something of an interesting problem, and I'm wondering if
anyone here has ever had something similar. If anything, this is one of
the reasons I _really_ dislike non-compiled programming languages.
I need to create a piece of software built around the GNU Bazaar
revision control system, but it is written in Python. Python is not an
option for the system I am working on, and so there seems to me to be a
bit of a problem.
Now, the bzr project provides all of its functionality in a library,
libbzr. This means that I should be able to do things like use the code
in another project. But there is a problem: Because the knuckleheads
at Canonical decided that Python is the Holy Grail and must be used for
absolutely everything, bzr (and libbzr) are written in Python. Doing a
little bit of research, I see that it is indeed possible to call Python
functions from C ABI land, but it's stupidly complex.
I _guess_ I'm looking for some method to generate meaningful wrappers
around Python libraries such that they can be used from another
programming language. Hell, if there were a Python front-end for GCC
that could just compile Python code into normal binary code that I could
call, I would be happy with that.
Is there any sort of system for this? I don't want to spend six weeks
More information about the Ale