Help with regex on telnet output

Eddie Corns eddie at
Thu Jul 8 12:25:38 CEST 2004

Adam Flott <adam at> writes:

>After I read your message I finnally figured out a solution. Just match
>the Hi part with the 6 or so variants that I know I will recieve. There
>isn't a prompt as this is an embedded device and doesn't work like a
>normal telnet login. The timeout issue is still a problem and I will
>have to investigate that further. But for another day.

OK, I'll just re-emphasise one point.  A minimal bit of testing suggests that
^ and $ will always cause it to hang.  My guess is that, although the timeout
code works on the connection, it will never ever have anything to match
against because these conditions cannot occur in a stream (there is no
equivalent to End-Of-String) so it will keep going back and looking and not
finding anything to match that $.


More information about the Python-list mailing list