[Tutor] Embedding Python

Dj Gilcrease digitalxero at gmail.com
Sun Feb 25 22:35:52 CET 2007


On 2/25/07, Dave Kuhlman <dkuhlman at rexx.com> wrote:
> If you have not already, you will want to look at SWIG
> (http://www.swig.org/).  SWIG will generate C or C++ code from a
> header file containing structs and classes and function
> declarations.  That generated code can then be compiled and linked
> to create a shared library (.so on Linux/UNIX or .dll on Windows),
> which can then be loaded with the Python "import" statement.

>From what I can tell SWIG cannot be used to create Python modules that
talk to a running C++ app, which is why I am embedding then extending
Python, so the import mymodule will only work while my C++ app is
running


More information about the Tutor mailing list