Python/C API Inheritance

2011-02-02 Thread Евгений Почитаев
Hi to all. May be someone do class inheritance in Python/C API, I know how create superclass/subclass. But how I can initialize superclass from subclass initializer? struct SuperClass { PyObject_HEAD; //... }; struct SubClass { PyObject_HEAD; //... }; static int SubClassInit(SubC

Re: Embedded Python static modules

2011-01-09 Thread Евгений Почитаев
I found solution: Py_NoSiteFlag = 1; Py_FrozenFlag = 1; Py_IgnoreEnvironmentFlag = 1; Py_SetPythonHome(""); Py_SetProgramName(""); -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedded Python static modules

2011-01-09 Thread Евгений Почитаев
I made frozen modules and link this modules with my program. PyImport_FrozenModules = frozen_modules; Py_Initialize(); I got next message: Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Traceback (most recent call last

Embedded Python static modules

2011-01-09 Thread Евгений Почитаев
I build python from sources(static version): ./configure --disable-shared Next I build program with this static library. Program work fine on my linux, but when I tried run my program on another linux, I got next message: Could not find platform independent libraries Could not find platform depend