- // Load the wxPython core API. Imports the wxPython.wxc
- // module and sets a pointer to a function table located there.
- wxPyCoreAPI_IMPORT();
-
+ // Load the wxPython core API. Imports the wx._core_ module and sets a
+ // local pointer to a function table located there. The pointer is used
+ // internally by the rest of the API functions.
+ if ( ! wxPyCoreAPI_IMPORT() ) {
+ wxLogError(wxT("***** Error importing the wxPython API! *****"));
+ PyErr_Print();
+ Py_Finalize();
+ return false;
+ }
+