Dear RPy Developers,

Thanks for the product. Within our little PyMVPA (www.pymvpa.org) we use
it to interface with some machine learning methods available in R.  Problem
comes whenever R code segfaults -- then regardless either python section is
interactive or not we are presented with R's dialog giving options to save dump
etc... ie the code

00562     if(R_Interactive) {
00563       REprintf("\nPossible actions:\n1: %s\n2: %s\n3: %s\n4: %s\n",
00564              "abort (with core dump, if enabled)",
00565              "normal R exit",
00566              "exit R without saving workspace",
00567              "exit R saving workspace");
00568       while(1) {
00569           if(R_ReadConsole("Selection: ", ConsoleBuf, CONSOLE_BUFFER_SIZE,
00570                        0) > 0) {
00571             if(ConsoleBuf[0] == '1') break;
00572             if(ConsoleBuf[0] == '2') R_CleanUp(SA_DEFAULT, 0, 1);
00573             if(ConsoleBuf[0] == '3') R_CleanUp(SA_NOSAVE, 70, 0);
00574             if(ConsoleBuf[0] == '4') R_CleanUp(SA_SAVE, 71, 0);
00575           }
00576       }

That stalls unittests which are running overnight, and moreover for some reason
it fills up stdout (or stderr... didn't check - stderr gets redirected to
stdout) with "Selection: " until disk fills up ;)

So, the question is -- since embedded R starts with hardcoded
R_Interactive, is there some other way to prevent "interaction" with segfault
'dialog'?

In my blind attempt I've tried to do something evil like

        def input1(*args): return "1"      # which is "1: abort (with core 
dump, if enabled)"
        rpy.set_rpy_input(input1)

which seemed to work at first, but whole battery of unittests started to
puke at some other places with "XXX lineno: 19, opcode: 0" and "SystemError:
unknown opcode" at other places...

I was using python2.5 and python-rpy 1.0.3-8 (rebuilt with debugging
symbols) on Debian amd64 system.

Thanks in advance for ideas!
-- 
                                  .-.
=------------------------------   /v\  ----------------------------=
Keep in touch                    // \\     (yoh@|www.)onerussian.com
Yaroslav Halchenko              /(   )\               ICQ#: 60653192
                   Linux User    ^^-^^    [175555]



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to