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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top