[Tutor] A problem in read_until(expected[,timeout])

W X Liu csmwxl at bath.ac.uk
Sat Sep 25 23:04:55 CEST 2004


Hello,

I want use read_until object to interact with telnet. The problem is that if I 
just want to match the expected string, then it will be fine. code would be 

read_until(expected)

But if I want to just want to match the timeout seconds, I don't know how to 
write it. 

I code it as 

read_until([,seconds]) 

Then invalid syntax occurs. Or if I add a expected string together with 
timeout, then I code it as

read_until(ten [,10])

ten is the string I want to match, and 10 is the expected timeout second, 
butinvalid syntax occurs again. So anyone can help me to solve this? Many thanks


Wenxin




More information about the Tutor mailing list