- // Load the wxPython core API. Imports the wxPython.wxc
- // module and sets a pointer to a function table located there.
- wxPyCoreAPI_IMPORT();
-
- // Ensure that the new classes defined in the wxPython wrappers are
- // recognised by the wx RTTI system. (If you don't use wxWindow in
- // your C++ app you won't need to do this.)
- wxClassInfo::CleanUpClasses();
- wxClassInfo::InitializeClasses();
-
+ // 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;
+ }
+