Python suitability questions

Bill Janssen janssen at parc.xerox.com
Tue Jul 20 14:34:31 EDT 1999


Excerpts from ext.python: 20-Jul-99 Re: Python suitability ques..
Martijn Faassen at vet.uu.n (1737)

> There are various ways to integrate Python with C or C++ code. You can
> hand code things of course, and I've heard Python's extending/embedding
> API is quite nice.

On this topic, you can also use ILU to integrate Python with C or C++,
in somewhat the same fashion as SWIG.  You describe the API with ISL,
implement the true side with Python, and call the surrogate-side stubs
from C or C++.  ILU handles the gluing of the Python to the C or C++.

Another advantage of doing this with ILU is that you only have to do it
once.  After that, you can load the same Python implementation into C,
C++, and Python (of course), with ILU 2.0alpha14.  With the next ILU
release, you'll also be able to load that module into languages with
threaded runtimes, such as Java and Common Lisp.  And you can do it
without having to use the Python API to C, or the Java API to C, or ...
-- your Python-side programming is in Python, the ILU code does all the
C or C++ glue.

There's an example of this in ILUSRC/examples/multlang/, and the next
release will also have examples of loading Python into Java and Common
Lisp via this mechanism.

Bill




More information about the Python-list mailing list