pxssh submit su commands = very very slow

gert gert.cuykens at gmail.com
Sat Jun 28 19:55:36 EDT 2008


On Jun 29, 1:44 am, gert <gert.cuyk... at gmail.com> wrote:
> On Jun 29, 1:19 am, Neil Hodgson <nyamatongwe+thun... at gmail.com>
> wrote:
>
> > gert:
>
> > > This works but after the su command you have to wait like 2 minutes
> > > before each command gets executed ?
> > >             s.sendline ('su')
> > >             s.expect('Password:')
>
> >     A common idiom seems to be to omit the start of the expected reply
> > since it may not be grabbed quickly enough. Then the prompt has to time
> > out. Try
> >               s.expect('assword:')
>
> I tested, but it has the same result. Each command after the su
> command needs 2 minutes before pxssh display's its output.
> Could there be a expat loop in pxssh or something ?

I am pretty sure it has to do with the prompt changing from $ to #



More information about the Python-list mailing list