[R-gui] R-wxPython Linux progress!

Vaidotas Zemlys mpiktas at delfi.lt
Tue Jun 22 17:26:51 CEST 2004


Hi,
> 
> I'm making very small progress with R-wxPython on Linux, but I
> think my latest progression is quite significant - I can now
> load:
> library(wxPython)
> which initializes a wxPython application and a wxPython frame,
> and I can then create wx message boxes from the R command line,
> from e.g.
> wxMessageBox("Hello!")
> 
> The problem I was having before appears to be a bug in
> wxPythonSrc-2.5.1.5/wxPython/src/helpers.cpp
> 
> In the function
> wxPyApp::_BootstrapApp()
> the value of argv passed to wxEntryStart was NULL.
> 
> A quick and dirty fix which worked for me was:
>     //PyObject* sysargv = PySys_GetObject("argv");
>     PyObject* sysargv = Py_BuildValue("[s]", "");
> 
> All I can do is message boxes so far.  I'm getting some other
> errors, but I should start making more rapid progress now!
>

I've applied your patch recompiled and reinstalled wxPython (only wxPython,  
not wx library). This time I used debug support:

python2.2 setup.py build_ext --inplace --debug  WX_CONFIG=/usr/local/share/ 
wx/2.5/bin/wx-config WXPORT=gtk2 UNICODE=1

Now
> .Python("wxRPyApp",.module="testRwxPy")

in R results in

18:20:39: Debug: Adding duplicate image handler for 'Windows bitmap file'
18:20:39: Debug: Adding duplicate image handler for 'Windows bitmap file'
Failing in conversion from Python object: Unhandled case!
NULL

Is this suppose to happen?

Vaidotas



More information about the R-SIG-GUI mailing list