gordon wrote: > initXXX() (normally) calls Py_InitModule4, so it would be the=20 > one in whatever XXXmodule loaded. exactly my point... so, would this work? =20 Index: Python/modsupport.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v retrieving revision 2.48 diff -u -r2.48 modsupport.c --- Python/modsupport.c 2000/07/09 03:09:56 2.48 +++ Python/modsupport.c 2000/07/18 07:55:03 @@ -51,6 +51,8 @@ { PyObject *m, *d, *v; PyMethodDef *ml; + if (!Py_IsInitialized()) + Py_FatalError("Interpreter not initialized (version = mismatch?)"); if (module_api_version !=3D PYTHON_API_VERSION) fprintf(stderr, api_version_warning, name, PYTHON_API_VERSION, name, = module_api_version); "Fatal Python error: Interpreter not initialized" might not be too = helpful, but it's surely better than "PyThreadState_Get: no current thread"... </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4