[Tutor] (no subject)

W X Liu csmwxl at bath.ac.uk
Thu Sep 9 19:02:09 CEST 2004


Hi, everyone,

I writed a program:

import telnetlib
import sys 

a=telnetlib.Telnet(host='mudlib.anarres.org',port='5000')
a.open(host='mudlib.anarres.org',port='5000') # I don't if I should use it.
a.read_until('Anarres II login:')
b=str('user'+chr(10))
a.write(b+ "\n")

b=str('password'+chr(10))
a.read_until('password:')
a.write(b + "\n")
print a.read_all()

But I always get a result like this:

>>> ================================ RESTART ================================
>>> 

in the Python shell(IDLE), and I cannot see any happening on that Telnet server?
Who could teach me about this?

Many thanks

Wenxin Liu


More information about the Tutor mailing list