embedded interpreter in shared library

Kelly Fitz kfitz at shout.net
Mon Nov 29 18:15:41 EST 1999


I am trying to create a shared object (for IRIX, today, eventually for
Linux and windoze) containing an embedded Python interpreter. My
application loads certain modules (not Python modules, its own sort of
modules) dynamically, and I'd like to provide a dynamically loadable
interface to a Python interpreter. Moreover, I'd like to be able to use
this shared object on machines without a Python installation, so I want
it to be self-sufficient, so to speak. 

My idea was to write a python script that loads the python modules I
want to include, and then freeze this script to generate the necessary c
files for those modules, and then compile and link those into my shared
library. Naturally, it doesn't seem to be working.

I have already created a shared object with an embedded interpreter, but
it requires a Python installation. I am also using SWIG to wrap some of
my own C++ classes into Python modules.

Does anyone know of a more straightforward way to embed an interpreter
in a shared object? Any advice will be welcome. Documentation on
embedding the Python interpreter seems scant at best.

-kel

-- 
---------------------------------------------------------------
 Kelly Fitz                 http://datura.ece.uiuc.edu/Kelly
               member - CERL Sound Group
  research programmer - NCSA Audio Development Group, UIUC
  visiting researcher - WSU Imaging Research Lab




More information about the Python-list mailing list