From: Hoang N. <hoa...@pl...> - 2001-09-24 17:36:07
|
Hello - I just started using Perl 5 and Expect-1.12 and have a problem with obtaining output from a spawned process. Much appreciate if you could point out a few things for me. Here is the basic steps of the program: - Spawn a telnet session into a term server (DigiBoard 8 ports) and obtain a object handle from that. At this point, what happens to my STDIN, STDOUT? How can i print to the screen that i started the script. - Goes through the normal login procedure with user name and such - Enter a forever loop. In this loop get input from keyboard. $command=<stdin> If the command is one that the script understands - process it else send the command to the UUT (unit under test), capture the out put from the command and wait for prompt. At this point, i encountered a few problems with capturing the output of the UUT. Not all the output of the UUT is captured regardless of variations that i tried. Is it possible that the output of UUT is buffered somewhere? in Expect? in Xterm? I don't have this problem if i go into interactive mode ($object->interact()). If you have done somthing like this before please drop me a line. Thanks in advance, Hoang |