From: Ken I. <fn...@ua...> - 2007-06-09 03:12:21
|
On Fri, Jun 08, 2007 at 10:41:33AM +0200, Roland Giersig wrote: > Well, not out of the box and I'm not sure if it works correctly, that > part (interact()) never was used in production and thus isn't really > tested. I cannot remember to have received feedback from somebody who > actually is using interact(). I'm using interact, but have it looking for a string, not a regex as I think the OP was looking for: $exp->interact(\*STDIN, 'BAIL!'); Ken > It should be possible by using interconnect(). You have to set up the > objects to interconnect on your own, using set_group() and set_seq() > and then calling interconnect(). Try using the source code for > interact() as an example and work from there... > > > Servus aus Wien! > > Roland > > On 6/6/07, Albrecht Bischoff <al...@nm...> wrote: > > Hello, > > > > is there a similar mechnism in expectperl for using the following expect > > code: > > > > --- expect code snippet --- > > interact { > > -o > > -re "..." { send "..."} > > } > > ---- > > > > The Expect.pm-documentation for $object->interact( "\*FILEHANDLE, > > $escape_sequence") states "Interaction ceases when $escape_sequence is > > read from FILEHANDLE, not $object. $object's listen group will consist > > solely of \*FILEHANDLE for the duration of the interaction." > > > > So, my question in other words: is there any possibility to cease > > interaction based on a (regex) pattern, read from $object? Any > > workaround, if not possible using interact()? > > > > Thanks in advance, > > Albrecht > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Expectperl-discuss mailing list > > Exp...@li... > > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss -- Ken Irving, fn...@ua..., 907-474-6152 Water and Environmental Research Center Institute of Northern Engineering University of Alaska, Fairbanks |