Embedding Python -- PyThreadState_Get: no current thread
Chris Fonnesbeck
spam at fisher.forestry.uga.edu
Sat May 25 16:02:52 EDT 2002
I'm trying to write some C code that embeds the python interpreter and
the Numeric classes (see trivial exampe below). However, running the
compiled code gives me a "PyThreadState_Get: no current thread" error.
None of the embedding documentation that I have read so far has
mentioned thread management! Any help appreciated.
#include <Python.h>
#include <Numeric/arrayobject.h>
int main() {
PyArrayObject *parray;
int dimensions[1];
dimensions[0]=10;
parray = (PyArrayObject
*)PyArray_FromDims(1,dimensions,PyArray_DOUBLE);
return 0;
}
More information about the Python-list
mailing list