Did you build from the 2.5.1.5 source tarball, or did you use the 2.5.1.1 .deb's? There were some changes to the embedded sample in 2.5.1.5 (as well as one or two things within wxPython IIRC) that fixed some bugs that prevented it from working correctly.
I am using a source tarball which I got about a month ago from the wxPy site. But I couldn't say the exact version number (zapped the directory name for the more generic "wxPy" name ... perhaps not the best idea, though pretty convenient ... and quite lazy).
If you are using 2.5.1.5 then check the value of wxPyCoreAPIPtr after the call to wxPyCoreAPI_IMPORT. If it is NULL then there was a problem importing the wx._core module.
Yes, wxPyCoreAPIPtr is indeed NULL after the call to wxPyCoreAPI_IMPORT().
Are you suggesting I should use the CVS version?
Related question: just curious what tools are you using to debug wxPy?
Did you build from the 2.5.1.5 source tarball, or did you use the 2.5.1.1 .deb's? There were some changes to the embedded sample in 2.5.1.5 (as well as one or two things within wxPython IIRC) that fixed some bugs that prevented it from working correctly.
I am using a source tarball which I got about a month ago from the wxPy site. But I couldn't say the exact version number (zapped the directory name for the more generic "wxPy" name ... perhaps not the best idea, though pretty convenient ... and quite lazy).
What is the result of
python -c "import wx;print wx.VERSION_STRING"
If you are using 2.5.1.5 then check the value of wxPyCoreAPIPtr after the call to wxPyCoreAPI_IMPORT. If it is NULL then there was a problem importing the wx._core module.
Yes, wxPyCoreAPIPtr is indeed NULL after the call to wxPyCoreAPI_IMPORT().
Are you suggesting I should use the CVS version?
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.
wxPyCoreAPI_IMPORT will do an import of the wx._core module and then will load a value from the module that is used to initialize wxPyCoreAPIPtr. wxPyCoreAPIPtr is a structure of function pointers that implement an API of helper functions and such that are located within the wx._code extension module. So if the import fails then nothing else can work.
Related question: just curious what tools are you using to debug wxPy?
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.
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!