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
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(
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
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