Automating a telnet session with an echo to stdout

Samuel newsgroups at
Mon Jun 4 21:46:59 CEST 2007

On Sat, 02 Jun 2007 17:41:01 +0000, Samuel wrote:

> I am trying to automate a telnet session (currently using Python's
> telnetlib) and would like to echo any response of the remote host to
> stdout, as soon as it arrives on telnetlib's open TCP socket.

For the records: Because I did not find any other solution, I modified 
telnetlib to provide a callback that let's me see what is going on. The
patch is here:


More information about the Python-list mailing list