Problems with rlogin and executing a script

Richard rshaw2 at midsouth.rr.com
Wed Oct 1 13:04:54 EDT 2003


Lukas Schnieper <schnieper at semafor.ch> wrote in message news:<mailman.1064994842.25014.python-list at python.org>...
> Hi all
> 
> I work with Suse Linux 8.2 and Python 2.2.2
> I'm trying to make a python script which makes a rlogin to another 
> system and executes there another script. So it looks like this:
> 
> os.system("rlogin <hostname>")
> os.system("./myscript.py")
> 
> The rlogin is ok. I can give in my password and i'm on the other host. 
> But the script goes not on until i exit the rlogin. How can a execute a 
> command on the new machine on which i'm logged in?

It looks like your calling myscript.py from your local system, not the
remote system. You should probably try the Pexpect module (
http://pexpect.sourceforge.net/ ), which will let you control a
command line program like rlogin or ssh.




More information about the Python-list mailing list