Skip to content
Prev 46788 / 63424 Next

type="message" possibility for capture.output() ?

That is not safe ... you should at least check if the message stream is 
not already diverted. As the help says:

      Sink-ing the messages stream should be done only with great care.
      For that stream ?file? must be an already open connection, and
      there is no stack of connections.

which seems sufficient warning not to make this any easier (and is why 
it had not been implemented in the past -- it has been discussed).  If 
you have code that you want to run and capture all the output from, it 
is preferable to run it in a separate process and there are lots of 
examples of that in the 'tools' package.
On 22/09/2013 18:03, Ben Bolker wrote: