Re: Reentrancy of Python interpreter

2007-10-01 Thread Brad Johnson
Hrvoje Niksic xemacs.org> writes: > > Brad Johnson ballardtech.com> writes: > > > I have a place where I execute a Python command that calls into C++ > > code which then in turn calls back into Python using the same > > interpreter. I get a fatal error which is "PyThreadStage_Get: no > > curre

Re: Reentrancy of Python interpreter

2007-10-01 Thread Hrvoje Niksic
Brad Johnson <[EMAIL PROTECTED]> writes: > I have a place where I execute a Python command that calls into C++ > code which then in turn calls back into Python using the same > interpreter. I get a fatal error which is "PyThreadStage_Get: no > current thread." Does the C++ code call into the inte

Re: Reentrancy of Python interpreter

2007-10-01 Thread Brad Johnson
yahoo.com> writes: > Looks like ( from PyThreadStage_Get error ) that you lost the GIL. You > probably > entered some C++ code and encapsulated you're work in the > > Py_BEGIN_ALLOW_THREADS > > Py_END_ALLOW_THREADS > > but you're is calling back the Python function, and you forgot > to acqui

Re: Reentrancy of Python interpreter

2007-09-29 Thread bvukov
On Sep 28, 11:31 pm, Brad Johnson <[EMAIL PROTECTED]> wrote: > I have embedded a single threaded instance of the Python interpreter in my > application. > > I have a place where I execute a Python command that calls into C++ code which > then in turn calls back into Python using the same interprete

Reentrancy of Python interpreter

2007-09-28 Thread Brad Johnson
I have embedded a single threaded instance of the Python interpreter in my application. I have a place where I execute a Python command that calls into C++ code which then in turn calls back into Python using the same interpreter. I get a fatal error which is "PyThreadStage_Get: no current thread.