$ python -c "import wx;print wx.VERSION_STRING"
2.5.1.5
I'm fairly sure that I had it working with 2.5.1.5. You could try calling PyErr_Print() when wxPyCoreAPIPtr==NULL to see if there is a Python exception set that can give you any more information.
----------embedded.cpp------------------
void MyApp::Init_wxPython()
{
std::cout << "---------222---------\n";
// Initialize Python
Py_Initialize();
PyEval_InitThreads();
std::cout << "---------444---------\n";
// Load the wxPython core API. Imports the wx._core module and sets a
// local pointer to a function table located there.
std::cout << wxPyCoreAPIPtr ;
wxPyCoreAPI_IMPORT();
std::cout << "\n---------555---------\n";
std::cout << wxPyCoreAPIPtr << "\n...after...\n";
if (wxPyCoreAPIPtr==NULL){
PyErr_Print();
}
// Save the current Python thread state and release the
// Global Interpreter Lock.
m_mainTState = wxPyBeginAllowThreads();
std::cout << "---------555555555---------\n";
}
···
---------------------------
gives:
me@self:/c/d/wx/embedded$ ./embedded
---------111---------
---------222---------
---------444---------
(nil)
---------555---------
(nil)
...after...
ImportError: No module named _core
Segmentation fault
For Python code I use a variety of methods. For C/C++ on unix I use gdb although I have yet to find a front-end to gdb that I like. I usually just use the gdb/emacs integration. I've been thinking about trying TotalView (http://www.etnus.com/) but havn't yet.
The reason for my question was that I am trying to be friends w. DDD, but, well, I don't feel any chemistry yet...
Ok, I've finished downloading the CVS sources, I'll give that a try.
Thanks,
Vio