Re: pxssh submit su commands = very very slow

2008-06-29 Thread gert
On Jun 29, 4:45 am, Dan Stromberg <[EMAIL PROTECTED]> wrote: > On Sat, 28 Jun 2008 19:08:59 -0700, gert wrote: > > this does the same except 100 times faster ? > > > I don't understand the logic about the prompt, its not the same as the > > output from the bash shell ? > > > [EMAIL PROTECTED]:~# ca

Re: pxssh submit su commands = very very slow

2008-06-28 Thread Dan Stromberg
On Sat, 28 Jun 2008 19:08:59 -0700, gert wrote: > this does the same except 100 times faster ? > > I don't understand the logic about the prompt, its not the same as the > output from the bash shell ? > > [EMAIL PROTECTED]:~# cat ssh2.py > import pexpect > import sys > > child = pexpect.spawn("

Re: pxssh submit su commands = very very slow

2008-06-28 Thread gert
this does the same except 100 times faster ? I don't understand the logic about the prompt, its not the same as the output from the bash shell ? [EMAIL PROTECTED]:~# cat ssh2.py import pexpect import sys child = pexpect.spawn("ssh [EMAIL PROTECTED]") #child.logfile = sys.stdout i = child.expect

Re: pxssh submit su commands = very very slow

2008-06-28 Thread Grant Edwards
On 2008-06-28, Neil Hodgson <[EMAIL PROTECTED]> 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

Re: pxssh submit su commands = very very slow

2008-06-28 Thread gert
On Jun 29, 1:44 am, gert <[EMAIL PROTECTED]> wrote: > On Jun 29, 1:19 am, Neil Hodgson <[EMAIL PROTECTED]> > wrote: > > > gert: > > > > This works but after the su command you have to wait like 2 minutes > > > before each command gets executed ? > > >             s.sendline ('su') > > >            

Re: pxssh submit su commands = very very slow

2008-06-28 Thread gert
On Jun 29, 1:19 am, Neil Hodgson <[EMAIL PROTECTED]> 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 th

Re: pxssh submit su commands = very very slow

2008-06-28 Thread Neil Hodgson
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 t