On 12/11/2010 4:20 AM, Darshak Bavishi wrote:
i have code to telnet remote machine (unix)
i am using port 5400 to telnet but o/p is not in visible format when i
run random commands or run

What is "o/p"?

when i give as read_some() it displays some lines but in case of
read_all() it gets hang !!

read_all() blocks until the server closes the connection. If the server is waiting for a command, then it will be blocking for a long time.

Try sending the "exit" command before you call read_all(). The server should finish processing the previous command before exiting, so you will still receive all of the requested data.

Cheers,
Ian

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to