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
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("
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
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
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')
> > >
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
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