any telnetlib equivalent in Python for rlogin?

walala mizhael at yahoo.com
Mon Nov 10 23:22:05 EST 2003


Dear all,

I recently came across a Python program which used "telnetlib" to automate
things in the several unix machines in our local networks; I attached the
script as follows;

I wonder if it is possible to have the equivlent libary for "rlogin" in
Python? Because our local networks support only SSH or RLOGIN. This script
used Telnet so it could not be used in our local networks;

Considering I am quite new to Python, is there any way that I can easily
change this program to be used on "rlogin"? For example, is there a library
called "RLOGIN" that I can simply use         self.tn = tn =
rloginlib.Rlogin(self.host), or something like that?

Thanks a lot,

-Walala

----------------------------------------------------------
import telnetlib
        self.tn = tn = telnetlib.Telnet(self.host)
        tn.read_until("login: ")
        tn.write(self.username + "\n")
        tn.read_until("Password: ")
        tn.write(self.password + "\n")

        # XXX: how to know whether login is successful?
        tn.read_until(self.username)
        #






More information about the Python-list mailing list