open remote terminal

Rafael Sachetto rsachetto at gmail.com
Sat Oct 20 09:00:23 EDT 2007


Take a look at this documentation:

http://pexpect.sourceforge.net/pxssh.html

On 10/20/07, Fabian Braennstroem <f.braennstroem at gmx.de> wrote:
>
> Fabian Braennstroem wrote:
>
> > Hi Steve,
> >
> > Steve Holden wrote:
> >
> >> Fabian Braennstroem wrote:
> >>> Hi,
> >>>
> >>> I would like to use python to start an terminal, e.g. xterm, and login
> >>> on a remote machine using rsh or ssh. This could be done using 'xterm
> -e
> >>> ssh machine', but after the login I would like to jump to a given
> >>> directory. Does anyone have an idea how to do this with python?
> >>>
> >>> Regards!
> >>> Fabian
> >>>
> >> pexpect would be the usual solution, I believe, if you could get it to
> >> interact correctly with your virtual terminal.
> >>
> >>    http://pexpect.sourceforge.net/
>
> I actually gave it a first very simple try:
>
> import pexpect
> child=pexpect.spawn('xterm')
> child.sendline('ls')
>
> Unfortunately nothing happens expect the start of xterm!? Does anyone have
> an idea, what I am doing wrong?
> Fabian
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Rafael Sachetto Oliveira

Sir - Simple Image Resizer
http://rsachetto.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071020/7eb8646a/attachment.html>


More information about the Python-list mailing list