On Sun, Jul 5, 2009 at 2:04 AM, Laurent Gautier<lgaut...@gmail.com> wrote:
> (''' q <- function(...) { <whatever> } ''' is only adding a function q()
> in the globalenv; baseenv['q']() would still call the original function).

Okay, append 'assign("q", q, envir=.BaseEnv)' to that line (if it
really matters; the goal would be to protect against mistakes, not
malice aforethought).

> One of the use-cases for setting a cleanup function is for example if you
> are building an application and want to offer an R console, but want to
> prevent the user (or run python-level cleanup) from terminating the
> application from the console.

Python-level cleanup makes sense. Ideally one would raise a
SystemExitException, but I guess it'd be hard to get the exception out
of the R callback and into the Python runtime.

-- Nathaniel

------------------------------------------------------------------------------
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to