Aug. 8, 2000
3:10 p.m.
mark wrote:
So I think that the adoption of our half-solution (ie, we are really only forcing a better error message - not even getting a traceback to indicate _which_ module fails)
note that the module name is available to the Py_InitModule4 module (for obvious reasons ;-), so it's not that difficult to improve the error message. how about: ... static char not_initialized_error[] = "ERROR: Module %.200s loaded an uninitialized interpreter!\n\ This Python has API version %d, module %.200s has version %d.\n"; ... if (!Py_IsInitialized()) { char message[500]; sprintf(message, not_initialized_error, name, PYTHON_API_VERSION, name, module_api_version) Py_FatalError(message); } </F>