using telnetlib
Phoe6
orsenthil at gmail.com
Wed Feb 28 07:53:14 EST 2007
On Feb 28, 4:15 pm, Bjoern Schliessmann <usenet-
mail-0306.20.chr0n... at spamgourmet.com> wrote:
> Phoe6 wrote:
> >>>> import telnetlib
> >>>> tn = telnetlib.Telnet("172.31.128.244")
> >>>> tn.read_until("Login: ")
> > '\r\nLogin: '
> >>>> tn.write("root\n:")
>
> ^^^
>
> With telnet, use "\r\n" for line breaks at *all* times to be on the
> safe side.
Thanks a lot, Björn.
That did help and solved my problem. ":" after \n was just a typo.
--
Senthil
More information about the Python-list
mailing list