From: Chris S. <cas...@pe...> - 2003-04-22 12:59:01
|
You might find that "$mtnm = new Expect;" will do wonders for providing an object upon which to call methods such as 'raw_pty();' God bless, Chris At 08:39 AM 4/22/2003 -0400, John Mahoney wrote: >On Tue, Apr 22, 2003 at 02:21:09PM +0200, Sascha Gagalon (02838) wrote: >> I am using Expect-1.15 and IO-Tty-1.02 on Sun Solaris 2.6 >> >> A little code: >> >> #!/tools/perl-5.6.0.sol26/bin/perl >> >> #use strict; >> $^W = 1; # warnings too >> >> >> use Expect; >> #$Expect::Exp_Internal = 1; >> #$Expect::Debug = 1; >> >> >> &start; >> $mtnm->hard_close(); >> exit(0); >> >> >> >> sub start >> { >> $mtnm = Expect->spawn("csteMTNM -c"); >> $mtnm->raw_pty(1); >> $mtnm->log_file("rmtest.log", "w"); >> $mtnm->expect(30, "STARTUP FINISHED\r\n"); >> } >> >> >> What's wrong? >> > >I believe that you need to place > $mtnm->raw_pty(1); >BEFORE > $mtnm = Expect->spawn("csteMTNM -c"); > >At least my notes tell that I must set pty to raw mode >before spawning... > >-- >John Mahoney <ex...@h0...> > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Expectperl-discuss mailing list >Exp...@li... >https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |