any telnetlib equivalent in Python for rlogin?

walala mizhael at
Tue Nov 11 05:22:05 CET 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 = tn =
rloginlib.Rlogin(, or something like that?

Thanks a lot,


import telnetlib = tn = telnetlib.Telnet(
        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?

More information about the Python-list mailing list