By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,772 Members | 906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,772 IT Pros & Developers. It's quick & easy.

Automating a telnet session with an echo to stdout

P: n/a
Hi,

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.

Currently I print the return value of the read_some() method (or other
read* methods) to the screen. However, that way of doing it means that
the response gotten from the remote host is printed only periodically.

Can anyone point me to how to enable the immediate echo? I know that this
is possible using interact(), but I do not want to hand the session over
to the user, I just want him to see what's going on.

-Samuel
Jun 2 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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:

http://sourceforge.net/tracker/index...70&atid=305470

-Samuel
Jun 4 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.