* Expectk - Any body an expert?! (Tcl/Tk)
@ 1997-12-05 15:48 Wayne Sweatt
0 siblings, 0 replies; only message in thread
From: Wayne Sweatt @ 1997-12-05 15:48 UTC (permalink / raw)
To: tru64-unix-managers
I know this isn't strictly Digital Unix, but I'm not getting any response from the "comp.lang.tcl"
newsgroup. I thought I'd re-post it here in case someone has an idea. I've scanned the Don Libes'
Expect book, but couldn't resolve it. Here's the question:
I am having a problem getting long messages stored fully into
expect_out(1,string). It seems to do the match check before the
entire message gets there. It seems to be getting chopped off
at random lengths using a send that always will receive the same
message at the same length in bytes. Is it possible that my buffer
is getting full? Will this cause an immediate "-re" check?
I am running tcl7.5, tk4.1,expect5.2 and oratcl2.4b3 under
Digital Unix 4.0b. I have a "set timeout -1" before my expect_background.
I didn't notice any difference. Just in case it makes a difference,
Here's the format of the expect_background code:
proc get_messages
global som eom
expect_background {
-re "^\[? \x07\]*${som}(.*)${eom}"
{process_message $expect_out(1,string) }
eof { handle_eof }
-re "\\? ${som}(.*)${eom}"
{process_message $expect_out(1,string) }
eof { handle_eof }
-re "${som}(.*)${eom}"
{process_message $expect_out(1,string) }
eof { handle_eof }
}
What happens, is that instead of getting an: expect-background: does "
${som} blah,blah,blah ${eom} match regular expression "^\[?
\x07\]*${som}(.*)${eom}"
I get:
expect-background: does "${som} blah,blah,blah bl" match regular
expression "^\[? \x07\]*${som}(.*)${eom}"
with the message cut off before it ever gets to the ${eom}!
Any ideas??
Thanks,
Wayne
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-12-05 15:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-12-05 15:48 Expectk - Any body an expert?! (Tcl/Tk) Wayne Sweatt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox