Using Expect in Ruby
- From: "stephan.zimmer" <stephan.zimmer@xxxxxxxxxxxxxx>
- Date: Thu, 30 Oct 2008 09:33:44 -0700 (PDT)
I'm using Expect inside of a ruby script to control an external
program. So far I have only used libexpect from a C program and would
have several questions regarding the Ruby interface of Expect, maybe
someone already experienced using it:
After having processed the output of the external program that I'm
interested in I would like to empty the expect buffer by expecting an
EOF marker. In an expect script this can be done by "expect eof
{ doSomething }". Does anyone know how this can be done in Ruby?
How can I know whether the external program has already finished?
How to handle several different cases inside of an expect statement:
expect {
timeout { doAction1 }
eof { doAction2 }
...
}
Is there any documentation for the ruby interface?
I would also be very grateful for partial answers and/or any related
information.
Thanks in advance,
Stephan
.
- Follow-Ups:
- Re: Using Expect in Ruby
- From: Jeremy McAnally
- Re: Using Expect in Ruby
- Prev by Date: Re: Rails gem site seems borked.
- Next by Date: Re: question about method call
- Previous by thread: Re: Rails gem site seems borked.
- Next by thread: Re: Using Expect in Ruby
- Index(es):
Relevant Pages
|