Jason Roberts wrote: > I have spent some time looking over the code you mention. Is the main > difficulty figuring out how to deal with the signal handlers so that Ctrl-C > is properly handled?
The main issue with callbacks not working is the fact that the embeddedR must be initialized a specific way for the C-level ptr_* callbacks to ba assigned and working. If you think that you could look further at it, we can communicate off-list regarding some of the details. L. > Jason > > -----Original Message----- > From: Laurent Gautier [mailto:lgaut...@gmail.com] > Sent: Tuesday, March 24, 2009 4:28 PM > To: Jason Roberts > Cc: 'RPy help, support and design discussion list' > Subject: Re: Console output from rpy2 > > Jason Roberts wrote: >> Hi Laurent, >> >> >> >> I am investigating the possibility of switching our application from rpy >> to rpy2. I came across this statement in the rpy2 docs >> (http://rpy.sourceforge.net/rpy2/doc/html/overview.html): >> >> >> >> "Win32 versions are still lacking some of the functionalities in the >> UNIX-alike versions, most notably the callback function for console >> input and output." >> >> >> >> Our win32 application relies on capturing the console output. We do not >> need to supply input, at least not with the current application. What is >> required to get the callback function working for console output on win32? >> > > Write win32-specific code required by the R C-level API. > The rpy2 version in the tip on bitbucket has an attempt at having it... > but I wrote it in a hurry, and without a Windows box to compile it on - > it is most certainly not working, and most likely not even compiling > under win32 (no problem on UNIX-alikes). > >> I looked through the code and understand basically how it works. I tried >> to determine what was needed to enable it on win32. In setup.py, there >> is this: >> >> >> >> if sys.platform == 'win32': >> >> define_macros.append(('Win32', 1)) >> >> else: >> >> define_macros.append(('R_INTERFACE_PTRS', 1)) >> >> >> >> This suggests that you are not defining R_INTERFACE_PTRS for a good >> reason. > > I can't tell if the reason is good, but it seemed to me that R's > configure step on win32 does not define R_INTERFACE_PTRS (but I am ready > to hear that I am completely mistaken). > >> Is there some reason why the code won't work on win32? >> > > The true reason lies at the C level. Check rpy2/rinterface/rinterface.c > in the source. > > > > > > L. > > > > >> Thanks for your help, >> >> >> >> Jason >> >> >> > > > ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list