[Tutor] need help foe telnet!!
W X Liu
csmwxl at bath.ac.uk
Mon Sep 6 15:13:04 CEST 2004
Hi everyone,
I am writing a program to connect a MUD(Telnet) server, here is the program:
import telnetlib
a=telnetlib.Telnet(host='mudlib.anarres.org',port='5000')
a.read_until('login:')
b=str('abb'+chr(10))
a.write(b+ "\n")
b=str('528950'+chr(10))
a.read_until('password:')
a.write(b+ "\n")
print a.read_until('abb at anarres')
it doesn't work, who can help me to fix it? Thanks a lot.
BTW, does "\n" represent "enter"?
Regards
Wenxin Liu
More information about the Tutor
mailing list