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: Sascha G. <Sas...@al...> - 2003-06-06 09:55:52
|
expect wrote: > On Thu, 05 Jun 2003 10:06:00 +0200 > Sascha Gagalon <Sas...@al...> wrote: > > >>Hi all >> >>first I want to thank you for your support in the past. You were right. >>My Expect was too old. I had long discussions with our SysAdmin. Now I >>got Perl 5.6.1 with Expect 1.14 and it seems to work. >>But I have another problem. >> >> >> >>If I use: >> >> $exp = Expect->spawn("getIOR"); >> $exp->log_file("rmtest.log"); >> >>$exp->log_file->print("############################################################################################\n"); >> $exp->log_file->print(" TESTCASE: Get initial IOR from the RM of the >>selected test station\n"); >> >>$exp->log_file->print("############################################################################################\n\n"); >> $exp->expect(70, >> ['-re', "tftp> Received.*\n" => sub { exp_continue; }], >> ["(IOR:[0-9a-f]+)" => sub{ $Root = $exp->exp_match(); exp_continue; }], >> "STARTUP FINISHED" >> ); >> $exp->log_file->print("\n"); >> $exp->hard_close(); >> $mtnm->log_file("rmtest.log"); >> >>I get in my logfile: >> >>############################################################################################ >> TESTCASE: Get initial IOR from the RM of the selected test station >>############################################################################################ >> >>tftp> Received 366 bytes in 0.1 seconds >>tftp> Testing on slbwnf with MTNBE70-01G >>IOR:00323c930000002a49444c3a6f6f632e636f6d2f436f734e616d696e672f4f424e616d696e67436f6e746578743a312e3000db80000000010000000000000074000102540000000f3134392e3230342e3132342e373900005aac6a0000000025abacab305f526f6f74504f4100436f6e74657874504f410000cafebabe3e4bc625000000001581380000000100000001000000200012080000010001000000020001002005010001000101000000000100010109 >> >>STARTUP FINISHED >> >> >>If I use: >> >> $exp->expect(70, '-re', ".*FINISHED"); >> >>I get: >> >>############################################################################################ >> TESTCASE: Get initial IOR from the RM of the selected test station >>############################################################################################ >> >>STARTUP FINISHED >> >> >>My Problem is that I do not necessarily know what to expect. I want to >>expect all, save it to a $var and do the interpretation later. >>So what is wrong? >> >>Greets Sascha > > > > > This seems like perl and not expect, I think this is just because .* is doing the usual greedy > match. So if you do a multiline match it should work. > > hth > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > What's the difference and how do I perform it? Sorry, I am relatively new to Perl and Expect. Greets Sascha |
From: expect <ex...@ih...> - 2003-06-05 14:50:06
|
On Thu, 05 Jun 2003 10:06:00 +0200 Sascha Gagalon <Sas...@al...> wrote: > Hi all > > first I want to thank you for your support in the past. You were right. > My Expect was too old. I had long discussions with our SysAdmin. Now I > got Perl 5.6.1 with Expect 1.14 and it seems to work. > But I have another problem. > > > > If I use: > > $exp = Expect->spawn("getIOR"); > $exp->log_file("rmtest.log"); > > $exp->log_file->print("############################################################################################\n"); > $exp->log_file->print(" TESTCASE: Get initial IOR from the RM of the > selected test station\n"); > > $exp->log_file->print("############################################################################################\n\n"); > $exp->expect(70, > ['-re', "tftp> Received.*\n" => sub { exp_continue; }], > ["(IOR:[0-9a-f]+)" => sub{ $Root = $exp->exp_match(); exp_continue; }], > "STARTUP FINISHED" > ); > $exp->log_file->print("\n"); > $exp->hard_close(); > $mtnm->log_file("rmtest.log"); > > I get in my logfile: > > ############################################################################################ > TESTCASE: Get initial IOR from the RM of the selected test station > ############################################################################################ > > tftp> Received 366 bytes in 0.1 seconds > tftp> Testing on slbwnf with MTNBE70-01G > IOR:00323c930000002a49444c3a6f6f632e636f6d2f436f734e616d696e672f4f424e616d696e67436f6e746578743a312e3000db80000000010000000000000074000102540000000f3134392e3230342e3132342e373900005aac6a0000000025abacab305f526f6f74504f4100436f6e74657874504f410000cafebabe3e4bc625000000001581380000000100000001000000200012080000010001000000020001002005010001000101000000000100010109 > > STARTUP FINISHED > > > If I use: > > $exp->expect(70, '-re', ".*FINISHED"); > > I get: > > ############################################################################################ > TESTCASE: Get initial IOR from the RM of the selected test station > ############################################################################################ > > STARTUP FINISHED > > > My Problem is that I do not necessarily know what to expect. I want to > expect all, save it to a $var and do the interpretation later. > So what is wrong? > > Greets Sascha This seems like perl and not expect, I think this is just because .* is doing the usual greedy match. So if you do a multiline match it should work. hth |
From: Sascha G. <Sas...@al...> - 2003-06-05 08:06:15
|
Hi all first I want to thank you for your support in the past. You were right. My Expect was too old. I had long discussions with our SysAdmin. Now I got Perl 5.6.1 with Expect 1.14 and it seems to work. But I have another problem. If I use: $exp = Expect->spawn("getIOR"); $exp->log_file("rmtest.log"); $exp->log_file->print("############################################################################################\n"); $exp->log_file->print(" TESTCASE: Get initial IOR from the RM of the selected test station\n"); $exp->log_file->print("############################################################################################\n\n"); $exp->expect(70, ['-re', "tftp> Received.*\n" => sub { exp_continue; }], ["(IOR:[0-9a-f]+)" => sub{ $Root = $exp->exp_match(); exp_continue; }], "STARTUP FINISHED" ); $exp->log_file->print("\n"); $exp->hard_close(); $mtnm->log_file("rmtest.log"); I get in my logfile: ############################################################################################ TESTCASE: Get initial IOR from the RM of the selected test station ############################################################################################ tftp> Received 366 bytes in 0.1 seconds tftp> Testing on slbwnf with MTNBE70-01G IOR:00323c930000002a49444c3a6f6f632e636f6d2f436f734e616d696e672f4f424e616d696e67436f6e746578743a312e3000db80000000010000000000000074000102540000000f3134392e3230342e3132342e373900005aac6a0000000025abacab305f526f6f74504f4100436f6e74657874504f410000cafebabe3e4bc625000000001581380000000100000001000000200012080000010001000000020001002005010001000101000000000100010109 STARTUP FINISHED If I use: $exp->expect(70, '-re', ".*FINISHED"); I get: ############################################################################################ TESTCASE: Get initial IOR from the RM of the selected test station ############################################################################################ STARTUP FINISHED My Problem is that I do not necessarily know what to expect. I want to expect all, save it to a $var and do the interpretation later. So what is wrong? Greets Sascha |
From: Wilbur R. J. <wr...@sa...> - 2003-05-27 17:58:22
|
I have been writing a simulator for parallel ftp and find some unexepected behavior on multi line matches. I'm seeing the following in my internal debug output. spawn id(3): Does `pput /tmp/foo/bar /tmp/bar/foo\r\n226 Transfer Complete.(moved = 40).\r\01240 bytes sent in 1.00 seconds (0.04 Kbytes/s)\r\012200 Command Complete.\r\012ftp> ' match: pattern #1: -re `.*\r\n226.*Transfer complete..*\r\012'? No. pattern #2: -re `^226.*Transfer complete..*\r\n'? No. Waiting for new data (10 seconds)... I don't understand why neither of these match. The first expression works fine with the ftp command, but the perl script simulator which produced this output does not match. Could anyone point me to a clue? Another interesting thing to know would be why \n shows as \012 sometimes and \n other times? Thanks -- Wilbur R. Johnson Distributed Decision Support Systems Sandia National Laboratories |
From: <db...@CT...> - 2003-05-15 22:32:27
|
Good catch! I was using the quotes in the first paragraph for emphasis, and should have been more careful with what this meant syntactically. I do apologise for any confusion this may have caused for readers, albeit it might have serendipitously identified what was being done originally(?) I was considering an attempt at printing $obj to be culprit instead of intended $obj->before, but did not consider printing "$obj->before" as the culprit. thanks for identifying this, David B. Austin Schutz <te...@of...> Sent by: To: db...@ct... exp...@li...urc cc: "'Roopa'" <ro...@de...>, "BLACKSTONE, J. eforge.net DAVID" <jda...@ci...>, exp...@li..., exp...@li... 05/15/2003 02:22 PM Subject: Re: [Expectperl-discuss] Help !! On Thu, May 15, 2003 at 12:48:49PM -0400, db...@CT... wrote: > > To affirm what Dave said, all of the examples I ran would indicate that > "$obj->exp_before()" does in fact work as advertised; i.e., returns > 'before' part of the last expect call, so I'm not sure either (I tried to > trick it! but it kept working as 'expected' .. :-). I think you have nailed the answer, though perhaps unintentionally. "$obj->exp_before()" is not the same thing as $obj->exp_before(). When you use double quotes in perl the interpreter will interpolate data from data structures, but it _will not_ execute subs. Thus "$obj->exp_before()" will be printed as Expect=GLOB(0x234243)->exp_before() or similar. If you want to use it in a string do something like: print "Before the match: '" . $obj->exp_before() . "'\n"; Though the original question didn't specify printing inside double quotes, I would bet $5 that was the problem. Austin ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Austin S. <te...@of...> - 2003-05-15 18:23:12
|
On Thu, May 15, 2003 at 12:48:49PM -0400, db...@CT... wrote: > > To affirm what Dave said, all of the examples I ran would indicate that > "$obj->exp_before()" does in fact work as advertised; i.e., returns > 'before' part of the last expect call, so I'm not sure either (I tried to > trick it! but it kept working as 'expected' .. :-). I think you have nailed the answer, though perhaps unintentionally. "$obj->exp_before()" is not the same thing as $obj->exp_before(). When you use double quotes in perl the interpreter will interpolate data from data structures, but it _will not_ execute subs. Thus "$obj->exp_before()" will be printed as Expect=GLOB(0x234243)->exp_before() or similar. If you want to use it in a string do something like: print "Before the match: '" . $obj->exp_before() . "'\n"; Though the original question didn't specify printing inside double quotes, I would bet $5 that was the problem. Austin |
From: <db...@CT...> - 2003-05-15 16:49:20
|
To affirm what Dave said, all of the examples I ran would indicate that "$obj->exp_before()" does in fact work as advertised; i.e., returns 'before' part of the last expect call, so I'm not sure either (I tried to trick it! but it kept working as 'expected' .. :-). Only think I can think of, is that somehow your code is getting confused, and printing the object itself instead of the function "before" on the expect object itself (if that makes sense), which if done, might look on your screen something like "Expect=GLOB(0x2ffbdc)". I might add that $obj->exp_before() and $obj->exp_after are not to be confused with the tcl/Expect version "expect_before()" and "expect_after()" which are completely different. I'm not suggesting this is a bad thing, just pointing out that use of these commands might create a little confusion with those already familiar with the Tcl version and are starting to use this module (caveat programmor). For what it's worth, hope this helps, "BLACKSTONE, J. DAVID" <jda...@ci...> To: "'Roopa'" <ro...@de...> Sent by: cc: exp...@li... exp...@li...urc Subject: RE: [Expectperl-discuss] Help !! eforge.net 05/15/2003 10:02 AM I'm under the impression Expect->before should always contain the contents of the buffer from before the last match. I'm not sure why it would give you a glob. jdb -----Original Message----- From: Roopa [mailto:ro...@de...] Sent: Thursday, May 15, 2003 12:31 AM To: BLACKSTONE, J. DAVID Subject: Re: [Expectperl-discuss] Help !! Hello, Thanks for the reply. I have a query regarding expect : What actually does $exp->before contain ? when i do $exp->send( "Hello\n" ) ; $exp->expect(5, -re, "Hello\r\n" ) and the expect matches, then print expect->before,it is printing some GLOB = value. But if it doesnt match it give me the buffer containing what was printed on screen. Shouldnt expect before always return the buffer before last expect ? Roopa ----- Original Message ----- From: BLACKSTONE, J. DAVID To: 'Roopa' ; exp...@li... Sent: Tuesday, May 13, 2003 7:05 PM Subject: RE: [Expectperl-discuss] Help !! Hi, Roopa. This is more of a general Perl issue than a Perl expect issue. Perl comes with a wealth of online documentation, which you can access with the perldoc program, or also at http://www.perldoc.com/ . I believe you'll find the perlretut manpage available at http://www.perldoc.com/perl5.8.0/pod/perlretut.html covers what you need. If you've never done regular expressions before, you'll want to start at the beginning (and maybe even read perlrequick first at http://www.perldoc.com/perl5.8.0/pod/perlrequick.html); otherwise, just search for "multi-line" on that page. To build your Perl skills, I emphatically recommend that you read through the documentation in the order given at http://www.perldoc.com/perl5.8.0/pod/perl.html , and purchase the "Llama book" _Learning Perl_ by Randall Schwartz et. al., and the "Camel book" _Programming Perl_ by Larry Wall et. al. jdb -----Original Message----- From: Roopa [mailto:ro...@de...] Sent: Tuesday, May 13, 2003 5:21 AM To: exp...@li... Subject: [Expectperl-discuss] Help !! Hi all, I am new to perl programming and expect and need some help. I want to compare the output of my API execution with the expected result. How can i do this ? My exp->before gives me the output of my test execution which i want to compare with another buffer $result. Each of these have several lines. E.g Hello World This is my first program. How to do this multi line comparison ? ********************************DISCLAIMER********************************** This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege of Deccanet Designs Ltd. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from retaining, using, copying, altering or disclosing the contents of this message. **************************************************************************** |
From: BLACKSTONE, J. D. <jda...@ci...> - 2003-05-15 14:03:54
|
I'm under the impression Expect->before should always contain the contents of the buffer from before the last match. I'm not sure why it would give you a glob. jdb -----Original Message----- From: Roopa [mailto:ro...@de...] Sent: Thursday, May 15, 2003 12:31 AM To: BLACKSTONE, J. DAVID Subject: Re: [Expectperl-discuss] Help !! Hello, Thanks for the reply. I have a query regarding expect : What actually does $exp->before contain ? when i do $exp->send( "Hello\n" ) ; $exp->expect(5, -re, "Hello\r\n" ) and the expect matches, then print expect->before,it is printing some GLOB = value. But if it doesnt match it give me the buffer containing what was printed on screen. Shouldnt expect before always return the buffer before last expect ? Roopa ----- Original Message ----- From: BLACKSTONE, J. DAVID To: 'Roopa' ; exp...@li... Sent: Tuesday, May 13, 2003 7:05 PM Subject: RE: [Expectperl-discuss] Help !! Hi, Roopa. This is more of a general Perl issue than a Perl expect issue. Perl comes with a wealth of online documentation, which you can access with the perldoc program, or also at http://www.perldoc.com/ . I believe you'll find the perlretut manpage available at http://www.perldoc.com/perl5.8.0/pod/perlretut.html covers what you need. If you've never done regular expressions before, you'll want to start at the beginning (and maybe even read perlrequick first at http://www.perldoc.com/perl5.8.0/pod/perlrequick.html); otherwise, just search for "multi-line" on that page. To build your Perl skills, I emphatically recommend that you read through the documentation in the order given at http://www.perldoc.com/perl5.8.0/pod/perl.html , and purchase the "Llama book" _Learning Perl_ by Randall Schwartz et. al., and the "Camel book" _Programming Perl_ by Larry Wall et. al. jdb -----Original Message----- From: Roopa [mailto:ro...@de...] Sent: Tuesday, May 13, 2003 5:21 AM To: exp...@li... Subject: [Expectperl-discuss] Help !! Hi all, I am new to perl programming and expect and need some help. I want to compare the output of my API execution with the expected result. How can i do this ? My exp->before gives me the output of my test execution which i want to compare with another buffer $result. Each of these have several lines. E.g Hello World This is my first program. How to do this multi line comparison ? ********************************DISCLAIMER********************************** This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege of Deccanet Designs Ltd. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from retaining, using, copying, altering or disclosing the contents of this message. **************************************************************************** |
From: BLACKSTONE, J. D. <jda...@ci...> - 2003-05-13 13:37:36
|
Hi, Roopa. This is more of a general Perl issue than a Perl expect issue. Perl comes with a wealth of online documentation, which you can access with the perldoc program, or also at http://www.perldoc.com/ . I believe you'll find the perlretut manpage available at http://www.perldoc.com/perl5.8.0/pod/perlretut.html covers what you need. If you've never done regular expressions before, you'll want to start at the beginning (and maybe even read perlrequick first at http://www.perldoc.com/perl5.8.0/pod/perlrequick.html); otherwise, just search for "multi-line" on that page. To build your Perl skills, I emphatically recommend that you read through the documentation in the order given at http://www.perldoc.com/perl5.8.0/pod/perl.html , and purchase the "Llama book" _Learning Perl_ by Randall Schwartz et. al., and the "Camel book" _Programming Perl_ by Larry Wall et. al. jdb -----Original Message----- From: Roopa [mailto:ro...@de...] Sent: Tuesday, May 13, 2003 5:21 AM To: exp...@li... Subject: [Expectperl-discuss] Help !! Hi all, I am new to perl programming and expect and need some help. I want to compare the output of my API execution with the expected result. How can i do this ? My exp->before gives me the output of my test execution which i want to compare with another buffer $result. Each of these have several lines. E.g Hello World This is my first program. How to do this multi line comparison ? |
From: Roopa <ro...@de...> - 2003-05-13 10:01:23
|
Hi all, I am new to perl programming and expect and need some help. I want to = compare the output of my API execution with the expected result. How can = i do this ? My exp->before gives me the output of my test execution which i want to = compare with another buffer $result. Each of these have several lines. E.g Hello World This is my first program. How to do this multi line comparison ? Thanks in advance, Roopa ********************************DISCLAIMER********************************** This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege of Deccanet Designs Ltd. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from retaining, using, copying, altering or disclosing the contents of this message. **************************************************************************** |
From: Miguel <mt...@mt...> - 2003-05-06 09:27:53
|
> Have you tried setting the "terminal length" and "terminal width" on the > router to the size of the "window" you are using? Thanks! I was setting terminal length 0 but was not setting terminal width From a command line telnet session it looks like this fixes the problem. (I don't understand why it was happening from the solaris box and not from the linux box.) !Gracias! Miguel |
From: Kemp, D. <dk...@em...> - 2003-05-06 09:04:34
|
Miguel, Have you tried setting the "terminal length" and "terminal width" on = the router to the size of the "window" you are using? I have a program that uses "telnet" to connect to Cisco routers without seeing the problems you are reporting. The code adjusts the terminal settings after connecting but before the user starts interacting with = the router. The code works on Solaris 7,8 and AIX 4.3.3 and goes something = like .... print $telnet "\cZ"; # Send ^Z (ctrl-Z) print $telnet "term length ".$tty->{'rows'}."\r"; $exp_match =3D $telnet->expect($timeout, -re, "^.*[#>]"); print $telnet "term width ".$tty->{'columns'}."\r"; $exp_match =3D $telnet->expect($timeout, -re, "^.*[#>]"); =20 Best Regards / Vriendelijke groeten / Mit Freundlichen Gr=FC=DFen / = Cordialement / Cordiali Saluti / Med V=E4nlig H=E4lsning / Atentamente Donald.E.S.Kemp AT&T Labs Network Management Solutions, Building 6000, Langstone Technology Park, Langstone Road, Havant, Hampshire, United Kingdom, PO9 1SA Phone: +44(0)23 9222 8424 email: dk...@em... -----Original Message----- From: Miguel [mailto:mt...@mt...] Sent: 02 May 2003 19:14 To: RGI...@cp... Cc: exp...@li... Subject: Re: [Expectperl-discuss] Solaris horizontal linewrap problem >> That looks great ... I'll give it a shot. >> >> A suggestion ... I think it may be helpful for others to put an >> example like this in the Expect man page. > > > OK, if you can provide a running example, I'll be glad to include it = in > the FAQs... :o) > Well, I have an example that runs, but it doesn't do the right thing :( The behavior is the same as before ... some evil spirit is still doing = me the favor of linewrapping. I am completely dumbfounded. Went back to a Linux box and confirmed = that I don't get the behavior there. For now I'm sticking with the 'stty columns 250 ; telnet foo' solution. Miguel ------------------------------------------------------- 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 |
From: John W. <jk...@ca...> - 2003-05-02 20:49:24
|
I'm using Perl Expect, with minicom, to dial into a system. The system uses an propritory emulation called R+R100. I can navigate on keywords with no problems, but at the same spot each time, Expect won't trigger on a keyword. I have a HP Protocol Analyzer in between the modem and my computer, so I can monitor the data being sent and received. I can see my keyword being sent by the remote system, but Expect refuses to trigger on it. In fact it's in a certain area of the remote system that Expect will not trigger on anything. So I basically have to go blind, until I get out of that area. Then Expect behaves normally again. I can only assume that something is messing Perl Expect up, like a control character sequence. Even if I clear the accumulator, when the "expect" times out, "match" will returns the last match. Has this happen to anyone before? Anyway to insure the sanity of Expect between sends, receives, or match methods? I'll try to connect the serial printer port on the back of the protocol analyzer to get a raw dump of the data, if that would be helpful. Kind if looks like this though ESC . 0 ESC . 0 ESC = " 4 SOMETEXT ESC = " ; MORETEXT CR LR ESC = " ; MORETEXT CR LR ESC = $ SPACE ESC y ............ Thanks, John BTW: An HP 4953A Protocol Analyzer for $100 off of EBay, best purchase in the world. :) -- John Walstra jk...@ca... P: 888.698.7768 x116 F: 888.458.0326 CarSpot.com 233 North Water Street, Suite 300 Milwaukee, WI 53202 |
From: BLACKSTONE, J. D. <jda...@ci...> - 2003-05-02 20:17:40
|
> Setting columns would be an option in the stty() > routine, but 'columns' isn't part of the POSIX terminal spec, > so isn't supported by stty(), which uses the POSIX library > for terminal handling. Thus the ugly kludge. You could subclass and add features to stty... ODBC handles varying database SQL features by first attempting to preparse the SQL and then, if that fails, just functioning as a passthrough to the database's SQL parser. Maybe stty could someday (given enough tuits) work that way. > Net::Telnet may save you here because it doesn't filter > through a terminal at all. Come to think of it, you could > probably just use open2 to start telnet without a terminal, > then use Expect on the filehandles open2 returns. If you could do that, then you could probably just open a socket or IO::Socket or something, which might be a little cleaner. I think I took that route once when I wasn't having luck figuring out how to use Net::Telnet with Expect.pm. > Anyway, that's probably as much talk about globs and > terminals that anyone can handle this week. :-) Nah! We're just getting started!! jdb *Apologies for this mail being in HTML; our mailserver seems to convert all plain text outgoing mail without my consent.* |
From: Austin S. <te...@of...> - 2003-05-02 20:05:12
|
On Fri, May 02, 2003 at 08:14:21PM +0200, Miguel wrote: > >> That looks great ... I'll give it a shot. > >> > >> A suggestion ... I think it may be helpful for others to put an > >> example like this in the Expect man page. > > > > > > OK, if you can provide a running example, I'll be glad to include it in > > the FAQs... :o) > > > Well, I have an example that runs, but it doesn't do the right thing :( > > The behavior is the same as before ... some evil spirit is still doing me > the favor of linewrapping. > > I am completely dumbfounded. Went back to a Linux box and confirmed that I > don't get the behavior there. > > For now I'm sticking with the 'stty columns 250 ; telnet foo' solution. > Setting environment variables doesn't change the behavior of your terminal window. As best I could tell, it is the local host which decides when output wraps - the remote host just sends it raw, and the local terminal decides when there's too much, so inserts a newline. Setting columns would be an option in the stty() routine, but 'columns' isn't part of the POSIX terminal spec, so isn't supported by stty(), which uses the POSIX library for terminal handling. Thus the ugly kludge. Net::Telnet may save you here because it doesn't filter through a terminal at all. Come to think of it, you could probably just use open2 to start telnet without a terminal, then use Expect on the filehandles open2 returns. Anyway, that's probably as much talk about globs and terminals that anyone can handle this week. :-) Austin |
From: Miguel <mt...@mt...> - 2003-05-02 18:17:40
|
>> That looks great ... I'll give it a shot. >> >> A suggestion ... I think it may be helpful for others to put an >> example like this in the Expect man page. > > > OK, if you can provide a running example, I'll be glad to include it in > the FAQs... :o) > Well, I have an example that runs, but it doesn't do the right thing :( The behavior is the same as before ... some evil spirit is still doing me the favor of linewrapping. I am completely dumbfounded. Went back to a Linux box and confirmed that I don't get the behavior there. For now I'm sticking with the 'stty columns 250 ; telnet foo' solution. Miguel |
From: Roland G. <RGI...@cp...> - 2003-05-02 17:10:35
|
>> You can Expect-ize a Net::Telnet object by doing something like >> >>$Expect::Exp_Internal = 1; >> >>$t = new Net::Telnet(); >>$t->open($host); >>$t->login($name, $pass); >> >>$e = Expect->exp_init($t); >> >>print $e "ls\r"; >> >>$e->expect(60, $prompt); >> > That looks great ... I'll give it a shot. > > A suggestion ... I think it may be helpful for others to put an example > like this in the Expect man page. OK, if you can provide a running example, I'll be glad to include it in the FAQs... :o) Roland |
From: Austin S. <te...@of...> - 2003-05-02 10:23:21
|
On Fri, May 02, 2003 at 10:51:46AM +0200, Miguel wrote: > That looks great ... I'll give it a shot. > > A suggestion ... I think it may be helpful for others to put an example > like this in the Expect man page. > > The doc says that exp_init takes a \*FILEHANDLE. > And it looks like to me that Net::Telnet returns an object. > Even now I don't understand why this works ... so on my own I would never > have figured out this solution. > > Just my 2c :) Yeah, I agree, definitely an addition to he docs would be in order. This will be a little weird, but I'll try a brief explanation anyway, which will be inaccurate enough that Randal Schwartz would skin me for saying it, but here goes: First part is that perl has a symbol table which uses "globs", which are what things are named, basically. They are a separate variable type in perl, that holds the other variable types in them that have the same name. They are tagged by having a * in front of them, like *foo. For example: *foo is the glob named 'foo'. $foo is a scalar variable. ${ *foo } (or $*foo) is the scalar contained by the glob *foo. $foo and $*foo are exactly the same thing. %foo is a hash %*foo is that exact same hash. @foo is an array, @*foo is that same array, etc. Filehandles are their own variable type, like a hash or a scalar, but there is no syntax in perl for dealing with them directly. This is a language deficiency, admitted even by Larry Wall. The workaround is to refer to the glob that holds the handle, from which a builtin function will be smart enought to extract and use the handle. Thus you can do something like: fileno(*STDIN); Which perl is nice enough to let you use without having to use the '*', like: fileno(STDIN); and the builtin fileno() function is smart enough to extract the handle from the glob. But if you want a _reference_ to the glob, you can't do \STDIN, because that confuses perl. So you have to explicitly refer to it as \*STDIN. Still awake? Ok, so when you have some sort of IO object, it's really a glob reference. In fact, you can do things like: print *$net_telnet "I'm printing stuff to the Net::Telnet object's handle\r"; The important thing is that $net_telnet is a glob reference where the glob contains a filehandle. Thus \*FILEHANDLE and $net_telnet are the same kind of creature even though they look completely different. I didn't really understand globs when I wrote the early versions of Expect, and some of the very crufty style choices in the module reflect this. But they work, and in general ain't broke. One of these days when I have too much time on my hands I'll submit a massive cleanup. Austin P.S. Am I really responsible for ${${*$self}{exp_Function}}{$escape_sequence}? |
From: Miguel <mt...@mt...> - 2003-05-02 08:55:07
|
> You can Expect-ize a Net::Telnet object by doing something like > > $Expect::Exp_Internal = 1; > > $t = new Net::Telnet(); > $t->open($host); > $t->login($name, $pass); > > $e = Expect->exp_init($t); > > print $e "ls\r"; > > $e->expect(60, $prompt); That looks great ... I'll give it a shot. A suggestion ... I think it may be helpful for others to put an example like this in the Expect man page. The doc says that exp_init takes a \*FILEHANDLE. And it looks like to me that Net::Telnet returns an object. Even now I don't understand why this works ... so on my own I would never have figured out this solution. Just my 2c :) > There's also a combo of the two, like you suggest, which is sort of a > best of both worlds approach where you let the protocol specific lib do > the dirty work, then use Expect afterwards. In this particular case, since I have already written everything using Expect, I think the right thing for me to do is only use Net::Telnet to manage the raw connection ... as your example above. In my quick read of Net::Telnet I saw that it generally uses the prompt-string to determine when commands are done. Cisco routers change the prompt string depending upon what kind of 'mode' you are in. That made me think that Expect was more flexible. Thanks to everyone for your help. Adios, Miguel |
From: Austin S. <te...@of...> - 2003-05-01 22:48:28
|
On Thu, May 01, 2003 at 11:45:25PM +0200, Miguel wrote: > > > Hmm, well I can confirm from my experience that solaris ptys are > > somewhat broken in many regards. But this doesn't help you. :-) > > > > What comes to mind is to circumvent ptys completely. Have you considered > > using Net::Telnet instead of spawning a telnet program? > Roland, > > That sounds like a great idea. > > I just took a look at the Expect & Net::Telnet man pages ... and frankly > it isn't yet clear to me how to hook to two together. That is ... what > method(s) do I use instead of $exp->spawn('telnet foo') > > Any pointers would be appreciated You can Expect-ize a Net::Telnet object by doing something like $Expect::Exp_Internal = 1; $t = new Net::Telnet(); $t->open($host); $t->login($name, $pass); $e = Expect->exp_init($t); print $e "ls\r"; $e->expect(60, $prompt); though you may want to just look at the Net::Telnet native routines such as 'cmd' and the like. There are basically two schools of thought. One is "use Net::Telnet because it's the tool made for the protocol" (telnet in this case). It will be more portable, and support protocol-specific functionality better as a general rule. The other is "use Expect because you are lazy". Handy if you are already familiar with it and don't need portability. The API is always the same. Both schools of thought have their advantages, well at least IMO. There's also a combo of the two, like you suggest, which is sort of a best of both worlds approach where you let the protocol specific lib do the dirty work, then use Expect afterwards. Austin |
From: Miguel <mt...@mt...> - 2003-05-01 22:28:30
|
> Here's a bit of ugliness that should work: > > $telnet = $exp->spawn('stty columns 250; telnet foo'); Yes, seems to work. Thanks! > though Roland's suggestion of using Net::Telnet is a good bet. I like this solution better ... since I've already been bitten by something that didn't port. But I'm still scratching my head trying to figure out how to hook the Net::Telnet object and the Expect object together :) Adios, Miguel |
From: Miguel <mt...@mt...> - 2003-05-01 21:48:43
|
> Hmm, well I can confirm from my experience that solaris ptys are > somewhat broken in many regards. But this doesn't help you. :-) > > What comes to mind is to circumvent ptys completely. Have you considered > using Net::Telnet instead of spawning a telnet program? Roland, That sounds like a great idea. I just took a look at the Expect & Net::Telnet man pages ... and frankly it isn't yet clear to me how to hook to two together. That is ... what method(s) do I use instead of $exp->spawn('telnet foo') Any pointers would be appreciated Gracias, Miguel |
From: Austin S. <te...@of...> - 2003-05-01 21:42:33
|
On Thu, May 01, 2003 at 08:39:18PM +0200, Miguel wrote: > I tried setting $exp->raw_tty(1) ... no joy > > I tried $exp->spawn('COLUMNS=250 ; telnet foo') ... no joy ... although > this does work from the command line > > I tried $exp->spawn('TERM=dumb ; telnet foo') ... no joy ... although > this does work from the command line > > I didn't see anything in the man page Here's a bit of ugliness that should work: $telnet = $exp->spawn('stty columns 250; telnet foo'); though Roland's suggestion of using Net::Telnet is a good bet. Austin |
From: Roland G. <Ro...@Gi...> - 2003-05-01 21:18:17
|
Hmm, well I can confirm from my experience that solaris ptys are somewhat broken in many regards. But this doesn't help you. :-) What comes to mind is to circumvent ptys completely. Have you considered using Net::Telnet instead of spawning a telnet program? Hope this helps, Roland Miguel wrote: > Summary > ------- > Problem with horizontal line-wrap when spawning telnet on SunOS 5.8. > How do I turn off this 'feature' of solaris in a portable way? > > Detail > ------ > I developed some perl code which uses Expect on a linux box. The script > spawns telnet to talk to a cisco router. I encountered a problem when I > moved the script to a Solaris box (where I don't have much operational > experience). > > When I $exp->send(a-line-of-text-which-is-very-long) then the echoed > results has lots of backspaces in it. I can see this behavior when I run > Solaris telnet from the command line ... rather than wrapping to the > next line the telnet is (apparently) doing me the 'favor' of wrapping > the text on the same line. The result is that my script is broken. > > I tried setting $exp->raw_tty(1) ... no joy > > I tried $exp->spawn('COLUMNS=250 ; telnet foo') ... no joy ... although > this does work from the command line > > I tried $exp->spawn('TERM=dumb ; telnet foo') ... no joy ... although > this does work from the command line > > I didn't see anything in the man page > > I searched the web and found a few people complaining, but did not see a > fix. > > bash has a similar feature. I saw one person complaining that bash was > broken was doing this to him on his Solaris system. I suspect that this > may have been a case of Solaris doing it to him. > > Any suggestions? > > Thanks in advance for your help. > > Miguel > > > > > > ------------------------------------------------------- > 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 > > |
From: Miguel <mt...@mt...> - 2003-05-01 20:11:04
|
Thanks for taking the time to respond. The code you recommended is almost exactly what I am doing. Except I am not echoing to the screen. The problem I am having does not show up on Linux. Only on SunOS. And you can demonstrate the problem on SunOS (without involving perl/Expect). So I am pretty confident that the problem is a SunOS setting in the terminal handler. Of course, I could be wrong ... Gracias, Miguel |