I am getting a SIGABRT
PyImport_GetModuleDict: no module dictionary!"
this is the code.
I need a InterpreterState because I need to create new threads using
pthread and clone the existing state.
Does PyInterpreterState_New, create a fulling initalized IS?
Does PyThreadState_New clone the existing state or a clean new one?
Py_Initialize();
is = PyInterpreterState_New();
if ( is == NULL ) {
fclose ( maa->pFILE);
free( maa );
return -2;
}
…
[View More] maa->is = is;
PyEval_InitThreads();
ts = PyThreadState_New(is);
PyThreadState_Swap( ts );
ts = PyThreadState_Get();
maa->ts = ts;
PyImport_ImportModule( "sys" );
[View Less]
EXPY is an express way to extend Python!
EXPY provides a way to extend python in an elegant way. For more information and a tutorial, see: http://expy.sourceforge.net/
What's new:
1. Special methods can now take @throws decorators.
2. Added convenience macros <type>_NEW and <type>_CheckExact for extension types.
3. Give warnings of missing Py_INCREF on all methods/functions returning an object.
4. And the responsibility of Py_INCREF is left for the developer.
5. Documentation update.
Cheers,
Yingjie
Hi,
Is it possible to use SWIG to parse C/C++, and provide an interface for me to generate some code? I thought it might be good to have SWIG help generate expy (see http://expy.sourceforge.net) files, then generate the python extension via expy.
Yingjie