The pipestreamr
package wraps Jonathan Wakely's pstreams library, which
allows communicating with a subprocess using stdin, stdout and stderr. All
reads are non-blocking.
The pstream
function opens a stream object linked to a specified
command (a program callable from the command line). Three functions:
write_stdin
, read_stdout
and read_stderr
can then be used to communicate with the launched proces. status
will
return information about the state of the stream object.
Timothy H. Keitt
Jonathan Wakeley (pstreams C++ library)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.