You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(26) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(5) |
Feb
(3) |
Mar
(11) |
Apr
(10) |
May
(2) |
Jun
(5) |
Jul
(13) |
Aug
(2) |
Sep
(3) |
Oct
(10) |
Nov
(18) |
Dec
(29) |
2002 |
Jan
(12) |
Feb
(14) |
Mar
(73) |
Apr
(28) |
May
(21) |
Jun
(39) |
Jul
(40) |
Aug
(42) |
Sep
(20) |
Oct
(4) |
Nov
(9) |
Dec
(18) |
2003 |
Jan
(2) |
Feb
(8) |
Mar
(6) |
Apr
(24) |
May
(24) |
Jun
(14) |
Jul
(16) |
Aug
(36) |
Sep
(34) |
Oct
(23) |
Nov
(4) |
Dec
(15) |
2004 |
Jan
(6) |
Feb
(13) |
Mar
(7) |
Apr
(5) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
(16) |
Nov
(4) |
Dec
(9) |
2005 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
(10) |
May
(5) |
Jun
(13) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(9) |
2006 |
Jan
|
Feb
(10) |
Mar
(22) |
Apr
(14) |
May
(5) |
Jun
(4) |
Jul
(19) |
Aug
(7) |
Sep
(16) |
Oct
(4) |
Nov
(1) |
Dec
(16) |
2007 |
Jan
(17) |
Feb
|
Mar
(35) |
Apr
(5) |
May
(20) |
Jun
(11) |
Jul
(33) |
Aug
(3) |
Sep
(2) |
Oct
(11) |
Nov
(23) |
Dec
(5) |
2008 |
Jan
(10) |
Feb
(9) |
Mar
|
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(20) |
2009 |
Jan
(8) |
Feb
(8) |
Mar
(3) |
Apr
(8) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(7) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(7) |
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
(1) |
Dec
(4) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(3) |
May
(2) |
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(30) |
Apr
(10) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(12) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Blackstone, J. D. <jda...@ci...> - 2002-06-07 13:55:09
|
> -----Original Message----- > From: ex...@ih... [mailto:ex...@ih...] > Sent: Thursday, June 06, 2002 7:35 PM > To: Blackstone, J. David > Cc: exp...@li... > Subject: Re: perl 500404 with Expect 1.15 ... > It looks like my problems are in Expect with spawn > these lines seem to be where things just hang: > > 144 open(STDIN,"<&". $slv->fileno()) > 147 open(STDOUT,">&". $slv->fileno()) > 150 open(STDERR,">&". $slv->fileno()) > > Okay maybe I'm SOL but maybe someone has a hunch on what > the problem is??? I think that is fairly new syntax as well. I was trying something like that recently in an unrelated program and had trouble making it work, but I don't remember if it was because it was an older perl. > > 5.004 is several years old; I'd hammer my sysadmin with > this and beg them > > to upgrade. :) > > If only life were so simple....I have the power to perform the upgrade > but there are dependencies on this perl. I don't know what > they are.... Oh, ho, ho. :) You need my super-special means of running many perls at once trick. Compile with --prefix=/usr/local/perl561. Make symlinks from everything in /usr/local/perl561/bin EXCEPT /usr/local/perl561/bin/perl into /usr/local/bin. Then write your programs explicitly with: #!/usr/local/bin/perl5.6.1 or #!/usr/[local/]?bin/perl5.00502 Then your programs don't break on upgrades and you can easily remove a version as a unit if and when you upgrade all programs that used it. jdb |
From: Blackstone, J. D. <jda...@ci...> - 2002-06-07 13:15:14
|
> -----Original Message----- > From: Austin Schutz [mailto:te...@of...] > Sent: Thursday, June 06, 2002 3:00 PM > To: Blackstone, J. David > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Suggestions for FAQ entries > > > On Thu, Jun 06, 2002 at 01:57:15PM -0500, Blackstone, J. David wrote: > > * My spawned processs doesn't produce any output, and > Expect.pm doesn't wait > > for it to end. > > > > [Might need to reword this. Suggestions? See > > http://use.perl.org/~djberg96/journal/5430/] > > > > Spawning a process just starts it up. From then on, any > interaction with > > your process, including waiting for it to end, is up to > you. Usually this > > involves expect()ing output. If there is no output, > however, you will need > > to expect() a special signal sent when the process ends called eof. > > Maybe I'm missing something. Why do I _need_ to expect > eof? Expect > should return at eof. It should also be setting $err. > > $process->expect(undef); > if( $process->error() =~ /EOF/ ) { > waitpid($process->pid()); > } > > Austin Or you can do that. Want to rewrite it to include the alternative? :) The way I showed is more like the original TCL Expect. I'm happy to see Expect.pm makes Expect very Perl-like by following the TMTOWTDI rule. :) jdb |
From: <ex...@ih...> - 2002-06-07 00:29:40
|
Blackstone, J. David writes: > Judging by the problem with "qr," I'm guessing Expect.pm will not work > with any Perl earlier than 5.005 (or is it 5.6?) which introduced the qr// > syntax for compiling regular expressions and passing them around as reusable > values. Even if the module itself ran under an earlier Perl, I'm guessing > you wouldn't find it near as useful without this syntax. quotemeta is new too I found out (test.pl only though) It looks like my problems are in Expect with spawn these lines seem to be where things just hang: 144 open(STDIN,"<&". $slv->fileno()) 147 open(STDOUT,">&". $slv->fileno()) 150 open(STDERR,">&". $slv->fileno()) Okay maybe I'm SOL but maybe someone has a hunch on what the problem is??? > > 5.004 is several years old; I'd hammer my sysadmin with this and beg them > to upgrade. :) If only life were so simple....I have the power to perform the upgrade but there are dependencies on this perl. I don't know what they are.... > > jdb > >> -----Original Message----- >> From: ex...@ih... [mailto:ex...@ih...] >> Sent: Tuesday, June 04, 2002 7:46 PM >> To: exp...@li... >> Subject: [Expectperl-discuss] perl 500404 with Expect 1.15 >> >> >> Apologies if this is mentioned somewhere. I did look >> in the readme and the man page. Does expect >> work with perl 5.00404? I am having some >> problems. expect spawn is hanging >> the test.pl didn't run: >> >> perl test.pl >> 1..36 >> Bareword "qr" not allowed while "strict subs" in use at >> test.pl line 270. >> syntax error at test.pl line 270, near "/^" >> Bareword "prompt" not allowed while "strict subs" in use at >> test.pl line >> 270. >> Global symbol "self" requires explicit package name at >> test.pl line 270. >> Substitution pattern not terminated at test.pl line 276. >> >> >> _______________________________________________________________ >> >> Don't miss the 2002 Sprint PCS Application Developer's Conference >> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >> _______________________________________________ >> Expectperl-discuss mailing list >> Exp...@li... >> https://lists.sourceforge.net/lists/listinfo/expectperl-discuss >> > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Austin S. <te...@of...> - 2002-06-06 20:01:30
|
On Thu, Jun 06, 2002 at 01:57:15PM -0500, Blackstone, J. David wrote: > * My spawned processs doesn't produce any output, and Expect.pm doesn't wait > for it to end. > > [Might need to reword this. Suggestions? See > http://use.perl.org/~djberg96/journal/5430/] > > Spawning a process just starts it up. From then on, any interaction with > your process, including waiting for it to end, is up to you. Usually this > involves expect()ing output. If there is no output, however, you will need > to expect() a special signal sent when the process ends called eof. Maybe I'm missing something. Why do I _need_ to expect eof? Expect should return at eof. It should also be setting $err. $process->expect(undef); if( $process->error() =~ /EOF/ ) { waitpid($process->pid()); } Austin |
From: Blackstone, J. D. <jda...@ci...> - 2002-06-06 18:57:23
|
* My spawned processs doesn't produce any output, and Expect.pm doesn't wait for it to end. [Might need to reword this. Suggestions? See http://use.perl.org/~djberg96/journal/5430/] Spawning a process just starts it up. From then on, any interaction with your process, including waiting for it to end, is up to you. Usually this involves expect()ing output. If there is no output, however, you will need to expect() a special signal sent when the process ends called eof. Use the array-reference syntax for expect to specify waiting for an eof: $exp->expect($t, [qr/Possible error message/ => sub { ... }], ['eof' => sub { ... }]); (Note that unlike other expected patterns, you currently have to specify a subroutine reference to be called when the eof is encountered. This will probably change in a future release. For now, if you don't want to do anything but wait for the program to exit, use ['eof' => sub { }], with nothing in the curly brackets. Expect.pm's handling of eof is based on the original TCL Expect. More information about original Expect's handling of eof can be found in _Exploring Expect_ by Don Libes, p. 98. * There's no way to reliably determine how long to set my timeouts; can't I make it unlimited? Yes. Use a timeout of C<undef>, Perl's undefined value. After writing this, I'm not sure I liked any of the wording. I won't be offended if someone totally rewrites it. :) |
From: <RGi...@a1...> - 2002-06-06 15:37:11
|
> And it looks like the solution is to change line 824 of > Expect.pm 1.15 which says > > if ($#{$eof_pat} > 3) { > > to instead say > > if (defined $eof_pat->[3]) { I'll look into this. You're right, the way EOF is handled isn't very elegant, given that a lot was grafted upon the orignal simple interface. Roland -- RGi...@cp... |
From: Blackstone, J. D. <jda...@ci...> - 2002-06-05 16:29:10
|
And it looks like the solution is to change line 824 of Expect.pm 1.15 which says if ($#{$eof_pat} > 3) { to instead say if (defined $eof_pat->[3]) { I believe $eof_pat->[3] is the coderef to call. It is inserted into the $eof_pat array by line 504 I think which tries to shift it off of a parameter list. Unfortunately if there was no coderef specified this inserts an undef into the array. The array is then the right size, but has an undefined value instead of a subroutine reference there. So, if we test for the definedness of the subroutine reference, we'll know whether or not we should attempt to call it. Of course, I may be completely wrong!!! :) jdb > -----Original Message----- > From: Blackstone, J. David [mailto:jda...@ci...] > Sent: Wednesday, June 05, 2002 11:20 AM > To: exp...@li... > Subject: [Expectperl-discuss] eof treated too specially :) > > > If I try to > > $exp->expect($t, ["password"]); > > it works just fine, but if I try to > > $exp->expect($t, ['eof']); > > I have problems because it wants me to supply a coderef to > call. So I get > an error message which says "Can't use string ("") as a > subroutine ref while > "strict refs" in use at > /usr/local/perl561/lib/site_perl/5.6.1/Expect.pm > line 829." I have to > > $exp->expect($t, ['eof' => sub { }]); > > > In a related issue, it seems you have to use the arrayref > syntax to get > the special eof treatment. You can't > > $exp->expect($t, 'eof') > > or you'll be matching the literal string 'eof.' > > > It's too bad we can't create a special magical regex+ > object that could > stand for a regular expression or a literal string or a > special condition > like eof. I'm sure that would greatly simplify the Expect.pm code. :) > Hmmm... this gives me something else to lie awake thinking > about at night. > > BTW, I think expecting eof is going to shape up to be an > answer to some > FAQs in the future. If you're interested, all of this > originated in a use > Perl; thread at http://use.perl.org/~djberg96/journal/5430 . > > jdb > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Blackstone, J. D. <jda...@ci...> - 2002-06-05 16:20:09
|
If I try to $exp->expect($t, ["password"]); it works just fine, but if I try to $exp->expect($t, ['eof']); I have problems because it wants me to supply a coderef to call. So I get an error message which says "Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/local/perl561/lib/site_perl/5.6.1/Expect.pm line 829." I have to $exp->expect($t, ['eof' => sub { }]); In a related issue, it seems you have to use the arrayref syntax to get the special eof treatment. You can't $exp->expect($t, 'eof') or you'll be matching the literal string 'eof.' It's too bad we can't create a special magical regex+ object that could stand for a regular expression or a literal string or a special condition like eof. I'm sure that would greatly simplify the Expect.pm code. :) Hmmm... this gives me something else to lie awake thinking about at night. BTW, I think expecting eof is going to shape up to be an answer to some FAQs in the future. If you're interested, all of this originated in a use Perl; thread at http://use.perl.org/~djberg96/journal/5430 . jdb |
From: <RGi...@a1...> - 2002-06-05 15:33:28
|
> Apologies if this is mentioned somewhere. I did look > in the readme and the man page. Does expect > work with perl 5.00404? I am having some > problems. expect spawn is hanging > the test.pl didn't run: I'm not sure. I think that Expect.pm is 5.004 clean (not using anything from 5.005), but test.pl is definitely not, as I only recently added some tests (using the qr// syntax). I'm sure that it would be easy to just go through test.pl and remove/revert the offending syntax. Alternatively you could simply install Expect.pm and hope the best. As I do not use autoload and the compilation of Expect.pm obviously succeeded, it should be OK from a sytactical point of view. But don't ask me about semantical changes between 5.004 and 5.005... Hope this helps, Roland -- RGi...@cp... |
From: Blackstone, J. D. <jda...@ci...> - 2002-06-05 13:12:54
|
Judging by the problem with "qr," I'm guessing Expect.pm will not work with any Perl earlier than 5.005 (or is it 5.6?) which introduced the qr// syntax for compiling regular expressions and passing them around as reusable values. Even if the module itself ran under an earlier Perl, I'm guessing you wouldn't find it near as useful without this syntax. 5.004 is several years old; I'd hammer my sysadmin with this and beg them to upgrade. :) jdb > -----Original Message----- > From: ex...@ih... [mailto:ex...@ih...] > Sent: Tuesday, June 04, 2002 7:46 PM > To: exp...@li... > Subject: [Expectperl-discuss] perl 500404 with Expect 1.15 > > > Apologies if this is mentioned somewhere. I did look > in the readme and the man page. Does expect > work with perl 5.00404? I am having some > problems. expect spawn is hanging > the test.pl didn't run: > > perl test.pl > 1..36 > Bareword "qr" not allowed while "strict subs" in use at > test.pl line 270. > syntax error at test.pl line 270, near "/^" > Bareword "prompt" not allowed while "strict subs" in use at > test.pl line > 270. > Global symbol "self" requires explicit package name at > test.pl line 270. > Substitution pattern not terminated at test.pl line 276. > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: <ex...@ih...> - 2002-06-05 00:41:10
|
Apologies if this is mentioned somewhere. I did look in the readme and the man page. Does expect work with perl 5.00404? I am having some problems. expect spawn is hanging the test.pl didn't run: perl test.pl 1..36 Bareword "qr" not allowed while "strict subs" in use at test.pl line 270. syntax error at test.pl line 270, near "/^" Bareword "prompt" not allowed while "strict subs" in use at test.pl line 270. Global symbol "self" requires explicit package name at test.pl line 270. Substitution pattern not terminated at test.pl line 276. |
From: <RGi...@a1...> - 2002-06-04 16:02:05
|
> The problem I have is after running for a few days (usually > between 2 > days and a week), the opened process stops responding > ($process->expect(...) returns no data). The process itself > has not > died. Any ideas what could be causing this? Hmm, is it producing output during that time that gets matched? Have you tried setting max_accum? Maybe the accumulator gets filled and filled until it exhausts the memory quota or something. Can you post the relevant code around the expect() call? Roland -- RGi...@cp... |
From: <RGi...@a1...> - 2002-06-04 15:53:22
|
> As far as I can tell from digging a little in the Pty/Expect/Tty > code as well as the kernel code, there's a problem with getting > rid of controlling terminals on FreeBSD. Actually the sentence > "Implement TIOCNOTTY or remove it from <sys/ioctl.h>" appears in > the todo list in /src/sys/kern/tty.c on FreeBSD. ... > I'm pretty sure that I haven't reached a full understanding in all > of this, so any corrections would be very welcome. Right, that's what I know about that issue too. Sorry, no further additions to that. And I frankly don't see a way to work around that issue. As long as TIOCNOTTY isn't implemented, TIOCSCTTY may fail. Roland -- RGi...@cp... |
From: <aar...@st...> - 2002-05-29 20:22:53
|
I have an Expect perl application that accepts messages over the network, and runs an interactive application with the data given. It opens up the process once and leaves it open. The problem I have is after running for a few days (usually between 2 days and a week), the opened process stops responding ($process->expect(...) returns no data). The process itself has not died. Any ideas what could be causing this? I'm using Expect 1.15 with IO::Tty 1.02. Previously I had this application running on Expect 1.10 with IO::Tty 0.04. IO::Tty 0.04 was a pain to install on HP-UX and the only way I could get it to work was to make it use /dev/tty instead of /dev/ptmx. However, the app would run fine for months. If there's a way I can get this to work with the default installation of IO::Tty 1.02, that would of course be much better for portability.. Thanks, Aaron Brice ST Microelectronics |
From: Guy R. <gu...@cw...> - 2002-05-28 10:19:01
|
Hi, =20 I am running into a few problems with Expect-1.15 on perl5.005. = Specifically, I get "Error: could not connect pty as controlling = terminal!" from time to time when trying to spawn a telnet to another = machine. I'm using FreeBSD 4.3 on i586. As far as I can tell from digging a little in the Pty/Expect/Tty code as = well as the kernel code, there's a problem with getting rid of = controlling terminals on FreeBSD. Actually the sentence "Implement = TIOCNOTTY or remove it from <sys/ioctl.h>" appears in the todo list in = /src/sys/kern/tty.c on FreeBSD. The problem as I can see it is in the following scenario: 1. in Expect->new, a pty is assigned 2. in spawn, Pty->make_slave_controlling_terminal is called 3. there it performs setsid() 4. afterwards it checks for the member {'io_pty_slave'} which was = generated before, in the context of the previous session, and therefor = the session struct in the kernel holds data about the previous session's = controlling terminal 5. the call for TIOCSCTTY has the following code in it (tty.c): if (!SESS_LEADER(p) || ((p->p_session->s_ttyvp || tp->t_session) && (tp->t_session !=3D p->p_session))) return (EPERM); where p is the proc structure, and tp is the tty structure (pointers = ofcourse) =20 Remembering that setsid() creates a new session context for the process = and that tp might have had a controlling tty associated with it, = problems may occur. Btw, as I mentioned earlier TIOCNOTTY has not yet been implemented. =20 I'm pretty sure that I haven't reached a full understanding in all of = this, so any corrections would be very welcome. =20 Guy |
From: R. H. <rhu...@ih...> - 2002-05-27 05:02:05
|
On Sun, 26 May 2002 22:25:40 +0100 Stephen Quinney <st...@ja...> wrote: > On Sat, May 25, 2002 at 03:01:26PM -0700, ex...@ih... wrote: > > > On another topic I think that the case when $timeout is undef > > isn't working properly. i.e. I think it's getting defined > > anyway but it's defined to the expect expression. I think something is > > getting shifted off but shouldn't be. I was seeing under debug > > that it was trying to subtract (line 612) using the expect string. > > I wonder if what you are doing here is > > $t->expect(,'-re',$pattern); > > or > > $t->expect('-re',$pattern); > > instead of > > $t->expect(undef,'-re',$pattern); Sorry I missed this important distinction. It says it right there in the man page too.... Thanks. > > if you want an undefined time out, i.e. it waits forever to match the > pattern, you need to state that specifically. > > Stephen > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Stephen Q. <st...@ja...> - 2002-05-26 21:25:49
|
On Sat, May 25, 2002 at 03:01:26PM -0700, ex...@ih... wrote: > On another topic I think that the case when $timeout is undef > isn't working properly. i.e. I think it's getting defined > anyway but it's defined to the expect expression. I think something is > getting shifted off but shouldn't be. I was seeing under debug > that it was trying to subtract (line 612) using the expect string. I wonder if what you are doing here is $t->expect(,'-re',$pattern); or $t->expect('-re',$pattern); instead of $t->expect(undef,'-re',$pattern); if you want an undefined time out, i.e. it waits forever to match the pattern, you need to state that specifically. Stephen |
From: <ex...@ih...> - 2002-05-25 22:01:43
|
On Sat, 25 May 2002 22:40:29 +0200 Roland Giersig <RGi...@CP...> wrote: > > Maybe I haven't framed the question properly. But that might just be > > that I don't understand the problem properly. With debugging on and > > $timeout not defined I get this > > "Timed out waiting for an EOF from spawn id(6)" and then it does a > > hard close. > > Oh, but this error message comes from soft_close(), so there already > was something unusual happening... Yes I guess I'll keep digging around. > > > I'm really pining for more examples of using this module, I saw kibitz > > but there isn't much else. I can read the docs until I'm blue but > > I tend to benefit more from seeing things in action. > > Sorry, there aren't really any, except those two in the FAQ. > Maybe somebody > would care to post some example code from their applications? > Unfortunately I've got one example another reader sent along for doing cisco stuff. That helps. On another topic I think that the case when $timeout is undef isn't working properly. i.e. I think it's getting defined anyway but it's defined to the expect expression. I think something is getting shifted off but shouldn't be. I was seeing under debug that it was trying to subtract (line 612) using the expect string. Thanks. |
From: Roland G. <RGi...@CP...> - 2002-05-25 20:40:39
|
> Maybe I haven't framed the question properly. But that might just be > that I don't understand the problem properly. With debugging on and > $timeout not defined I get this > "Timed out waiting for an EOF from spawn id(6)" and then it does a > hard close. Oh, but this error message comes from soft_close(), so there already was something unusual happening... > I'm really pining for more examples of using this module, I saw kibitz > but there isn't much else. I can read the docs until I'm blue but > I tend to benefit more from seeing things in action. Sorry, there aren't really any, except those two in the FAQ. Maybe somebody would care to post some example code from their applications? Unfortunately I left my code at my previous employer... Roland -- RGi...@cp... |
From: <ex...@ih...> - 2002-05-24 15:57:57
|
On Fri, 24 May 2002 09:48:33 +0200 RGi...@a1... wrote: > > I'm running expect to talk to a script and I have the questions > > (that the script asks) and the answers. I am running it inside a > > foreach loop based on number of questions/answers. > > > > Like so: > > > > $exp = Expect->spawn('script'); > > > > foreach $qa (0..$#qaarray) > > { > > $exp->expect($timeout, $qaarray[$qa]) > > $exp->send($aarray[$qa]); > > } > > > > > > The time between when an answer is given and when a new > > question is asked varies. In some cases it may take an > > hour and in others less than 1 second. The problem I have > > is that expect timesout and does a hard_close after some > > amount of time. > > Yes, after the amount of time you specify in $timeout... > > > I need it to wait for the next question > > no matter how long it takes. I've read the docs and tried > > a lot of different things. > > Really? So you obviously didn't notice this in the docs: > > "Given $timeout in seconds Expect will wait for $object's > handle to produce one of the match_patterns. Due to o/s > limitations $timeout should be a round number. If > $timeout is 0 Expect will check one time to see if > $object's handle contains any of the match_patterns. If > $timeout is undef Expect will wait forever for a pattern > to match." Yes, saw this. Maybe I haven't framed the question properly. But that might just be that I don't understand the problem properly. With debugging on and $timeout not defined I get this "Timed out waiting for an EOF from spawn id(6)" and then it does a hard close. I'm really pining for more examples of using this module, I saw kibitz but there isn't much else. I can read the docs until I'm blue but I tend to benefit more from seeing things in action. Thanks for any help. |
From: <RGi...@a1...> - 2002-05-24 07:48:46
|
> I'm running expect to talk to a script and I have the questions > (that the script asks) and the answers. I am running it inside a > foreach loop based on number of questions/answers. > > Like so: > > $exp = Expect->spawn('script'); > > foreach $qa (0..$#qaarray) > { > $exp->expect($timeout, $qaarray[$qa]) > $exp->send($aarray[$qa]); > } > > > The time between when an answer is given and when a new > question is asked varies. In some cases it may take an > hour and in others less than 1 second. The problem I have > is that expect timesout and does a hard_close after some > amount of time. Yes, after the amount of time you specify in $timeout... > I need it to wait for the next question > no matter how long it takes. I've read the docs and tried > a lot of different things. Really? So you obviously didn't notice this in the docs: "Given $timeout in seconds Expect will wait for $object's handle to produce one of the match_patterns. Due to o/s limitations $timeout should be a round number. If $timeout is 0 Expect will check one time to see if $object's handle contains any of the match_patterns. If $timeout is undef Expect will wait forever for a pattern to match." Hope this helps, Roland -- RGi...@cp... |
From: <ex...@ih...> - 2002-05-24 04:13:42
|
I'm running expect to talk to a script and I have the questions (that the script asks) and the answers. I am running it inside a foreach loop based on number of questions/answers. Like so: $exp = Expect->spawn('script'); foreach $qa (0..$#qaarray) { $exp->expect($timeout, $qaarray[$qa]) $exp->send($aarray[$qa]); } The time between when an answer is given and when a new question is asked varies. In some cases it may take an hour and in others less than 1 second. The problem I have is that expect timesout and does a hard_close after some amount of time. I need it to wait for the next question no matter how long it takes. I've read the docs and tried a lot of different things. |
From: <RGi...@a1...> - 2002-05-23 11:20:34
|
=3E I have a first perl/expect script attempt going=2E I have the main =3E structure and loop set up=2E It=27s working fine=2E I=27m trying to= ssh = =3E to a remote server to execute a command=2E I then want to funnel =3E the output back to an array=2E =3E = =3E Does anyone have anything similar I can take apart and learn from=3F = =3E A couple of the problems I=27m hitting=2E How do I turn off echo fro= m my =3E spawn commands=3F How do I shove my output back into my array=3F I=27= m not =3E seeing a method for this=2E First=2C have you noted the following two FAQs=3F I want to automate password entry for su/ssh/scp/rsh/=2E=2E=2E You shouldn=27t use Expect for this=2E Putting passwords=2C especially root passwords=2C into scripts in clear text can mean severe security problems=2E I strongly recommend using other means=2E For =27su=27=2C consider switching to =27sudo=27=2C w= hich gives you root access on a per-command and per-user basis without the need to enter passwords=2E =27ssh=27/=27scp=27 can be se= t up with RSA authentication without passwords=2E =27rsh=27 can use the =2Erhost mechanism=2C but I=27d strongly suggest to switch to =27ssh=27=3B to mention =27rsh=27 and =27security=27 in the same sent= ence makes an oxymoron=2E It will work for =27telnet=27=2C though=2C and there are valid uses for it=2C but you still might want to consider using =27ssh=27=2C as keeping cleartext passwords around is very insecure=2E I want to use Expect to automate =5Banything with a buzzword=5D=2E=2E=2E= Are you sure there is no other=2C easier way=3F As a rule of thumb=2C Expect is useful for automating things that expect to talk to a human=2C where no formal standard applies=2E For other tasks that do follow a well-defined protocol=2C there are often better-suited modules that already can handle those protocols=2E Don=27t try to do HTTP requests by spawning telnet to port 80=2C use LWP instead=2E To automate FTP=2C take a look at the Net=3A=3AFTP manpage or =22ncftp=22 (http=3A//www=2Encftp=2Eorg)=2E You don=27t use a screwdriver to hammer in your nails either=2C or do you=3F So=2C how about using =27=24output =3D qx(ssh =24host =24command)=27=3F The Expect manpage contains a source example how to automate telnet = login=2C which might be of interest=2E See also the entry for =27log=5Ff= ile=27=2E = Apart from that=2C how about matching line for line and stuffing that = into an array=3F E=2Eg=2E =24exp-=3Eexpect(=24timeout=2C =5B qr/=2E*=5Cn/ =3D=3E sub =7B my =24self= =3D shift=3B push = =40array=2C =24self-=3Ematch()=3B exp=5Fcontinue=3B =7D =5D)=3B Hope this helps=2C Roland -- RGiersig=40cpan=2Eorg ----- Urspr=FCngliche Nachricht ----- Von=3A =22Robert L=2E Harris=22 =3CRobert=2EL=2EHarris=40rdlg=2Enet=3E Datum=3A Dienstag=2C Mai 21=2C 2002 6=3A50 pm Betreff=3A =5BExpectperl-discuss=5D New Script =3E = =3E = =3E First post=2C hopefully on topic=2E =3E = =3E = =3E = =3E =3Awq! =3E ------------------------------------------------------------------- =3E -------- =3E Robert L=2E Harris =7C Micros=7E1 =3A =3E Senior System Engineer =7C For when quality=2C reliabilit= y =3E at RnD Consulting =7C and security just aren=27t =3E =5C=5F that important! =3E DISCLAIMER=3A =3E These are MY OPINIONS ALONE=2E I speak for no-one else=2E =3E FYI=3A =3E perl -e =27print =24i=3Dpack(c5=2C(41*2)=2Csqrt(7056)=2C(unpack(c=2CH= )- =3E 2)=2Coct(115)=2C10)=3B=27 =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E = =3E Don=27t miss the 2002 Sprint PCS Application Developer=27s Conference= =3E August 25-28 in Las Vegas -- http=3A//devcon=2Esprintpcs=2Ecom/adp/in= dex=2Ecfm =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Expectperl-discuss mailing list =3E Expectperl-discuss=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/expectperl-discuss= =3E |
From: Robert L. H. <Rob...@rd...> - 2002-05-21 16:50:34
|
First post, hopefully on topic. I have a first perl/expect script attempt going. I have the main structure and loop set up. It's working fine. I'm trying to ssh to a remote server to execute a command. I then want to funnel the output back to an array. Does anyone have anything similar I can take apart and learn from? A couple of the problems I'm hitting. How do I turn off echo from my spawn commands? How do I shove my output back into my array? I'm not seeing a method for this. :wq! --------------------------------------------------------------------------- Robert L. Harris | Micros~1 : Senior System Engineer | For when quality, reliability at RnD Consulting | and security just aren't \_ that important! DISCLAIMER: These are MY OPINIONS ALONE. I speak for no-one else. FYI: perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);' |
From: Austin S. <te...@of...> - 2002-05-18 00:38:32
|
On Fri, May 17, 2002 at 01:37:33PM -0700, Syamala Tadigadapa wrote: > I have made significant improvement from 24hrs to 4.5hrs. by > clearing accumulator after every time out of 15sec. It could make > more saving if I set the time out to say 3 seconds or so. Now then, > I have still the CPU monopolization occurring of course. As suggested, > I am going to try set the Exp_Max_Accum to 8096. I can reports my > findings once I see them. I have the following questions. > > 1. Why can't I have a method in Expect which can allow me to > truncate the accumulator to the point of pattern matching. If > present, I could simply call the method once I find a match. > This could prevent the buffer/accumulator from choking. > 2. Expect can trim the accumulator at each each match to a > configurable size, say a default of 4k. This should be done > evenly at time out points also. This could as well prevent > accumulator/buffer from choking. The accumulator should be clearing by itself after every successful match, not including timeout. 8096 is the maximum number of bytes that can be read at one time in the current implementation. I would suggest a slightly _larger_ number for the possibility that you will have a pattern match that occurs right at the border between the last read and the current one. If you are having high CPU utilization after you set max accum, I would guess that you are probably seeing many small reads very close together in time rather than one big one, forcing the expect matching engine into action each time. If this is indeed the case it might be possible to put small delays inside the expect matching loop to force it to read in larger chunks. Please let us know how it goes. Thanks, Austin |