From: "list. rb" Date: 2009-06-20T11:57:41+09:00 Subject: Re: Capturing System Call Return Values? --0016e6434bcad3a662046cbecdf1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit One thin wanted to do but never got around to it - was to return the output in a call back as each line was written to.. On Fri, Jun 19, 2009 at 9:11 PM, Delano Mandelbaum wrote: > > I've found a work around by splitting the returned string using > > [string].split(' ') but this isn't as elegant as I had hoped. > > I wrote a library called Rye to solve this problem. It might be some > like what you're looking for. Here's an example of running local > external processes: > > ret = Rye.shell('script.py', 'arg1', 'arg2') > p ret.stdout # => ['line1', 'line2'] > p ret.exit_code # => 0 > p ret.stderr # => nil > p ret.class # => Rye::Rap > > There is also an object oriented interface for executing remote > processes via SSH. > > Codes: http://github.com/delano/rye/ > RDocs: http://rye.rubyforge.org/ > > Delano > > > --0016e6434bcad3a662046cbecdf1--