Re: [Tutor] Capturing and parsing over telnet

2008-11-30 Thread Stephen Nelson-Smith
Hi, > I effectively want something like c.read_everything() Looks like read_very_eager() does what I want. S. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Capturing and parsing over telnet

2008-11-30 Thread Stephen Nelson-Smith
Hi, > How about pexpect; > http://www.noah.org/wiki/Pexpect Ah yes - I've used that before to good effect. ATM I'm playing with telnetlib. Is there a way to read everything on the screen, even if I don't know what it will be? eg: c = telnetlib.Telnet("test.lan") c.read_until("name: ") c.write(

Re: [Tutor] Capturing and parsing over telnet

2008-11-30 Thread David
Stephen Nelson-Smith wrote: > I want to write a program that connects to a TCP port using telnet, > and issues commands, parsing the output the command provides, and then > issuing another command. > > This might look like this: > > $ telnet water.fieldphone.net 7456 > Welcome to water, enter you

[Tutor] Capturing and parsing over telnet

2008-11-30 Thread Stephen Nelson-Smith
I want to write a program that connects to a TCP port using telnet, and issues commands, parsing the output the command provides, and then issuing another command. This might look like this: $ telnet water.fieldphone.net 7456 Welcome to water, enter your username >_ sheep Enter your password >_ s