Automating a telnet session with an echo to stdout

S

Samuel

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
 
S

Samuel

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top