embedding python

Robin Becker robin at jessikat.fsnet.co.uk
Tue Dec 24 04:14:20 EST 2002


I've just come back to the embedding problem. On win32 we've tried to do
python embedding using a dll which uses a registry key or the dll's
location to locate the appropriate python dll. The DLL then loads up
pointers to the required bits of the API.

Some of the API is implemented as macros so it's hard to maintain python
independence. In particular the Py_DECREF/INCREF things are not part of
the runtime API, one can add PyString_Check and a bunch of others. It
seems the idea of using a version agnostic interface might as well be
thrown away. The C API seems to be a compile time only thing.

It seems to be abnormal to build python as a shared library with unix
systems. Is there a standard way to accomplish this? Should I bite the
bullet and accept that any embedding process has to use the static lib
and create large interface shared things? 
-- 
Robin Becker



More information about the Python-list mailing list