From: Jamis Buck Date: 2003-12-12T04:37:19+09:00 Subject: Re: expect, rexpect and others Ben Giddings wrote: > Is there some historical reason why the result of a match is "buffer", > $1, $2, $3...? To me, it would make more sense to do > > matchdata = regexp.match(buffer) > > return matchdata.to_a > The other thing I would really like to see in this library is the ability to specify an IO stream that will display the output of the process... Perhaps there already is a way, but couldn't see it. What I did was add an output_stream= setter, and then in the inputData routine I just sent 'data' to the output stream, if it was set. Does the library already support this functionality? Is there a better way to do this? (I'm thinking along the lines of the 'interact' feature of the python 'pexpect' library.) -- Jamis Buck jgb3@email.byu.edu ruby -h | ruby -e 'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'