telnet
Billy Ng
kwokng at earthlink.net
Tue Apr 30 18:49:37 EDT 2002
Hi folks,
I am writing a python app that uses the Telnet object to connect to the
server. Here is the code,
tn = telnetlib.Telnet(host)
tn.read_until("Please enter your id")
tn.write(userid+"\r\n")
>From here, tn will return either "Please enter your password" or "Wrong id,
please enter your id again". My question is how can I get the returning
string before I do the next tn.write()
Thanks!
Billy Ng
More information about the Python-list
mailing list