On Monday, December 30, 2013 8:33:57 AM UTC, Nils Bruin wrote:
>
> I don't think that's the issue here. The problem here seems to be that the 
> subprocess sends output before the pty is done echoing. That doesn't seem 
> to within pexpect's control: it's the subprocess that's too fast.
>

That is exactly what I am talking about: The pexpect pattern must match at 
a point where the subprocess has stopped processing and is just waiting for 
further input. But if you match for a prompt, say, and then the subprocess 
spits out another space or return before it waits for input then the 
additional characters will end up in random places in the output stream.

Actually, it seems to me that the pty is being a bit careless: shouldn't it 
> make sure that it's done echoing before it actually delivers the character 
> to the process?
>

There is no such guarantee, pexpect is akin to typing into a terminal. If 
echo is on then the typed key shows up immediately and in-between stdout.
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to