On 10 June 2017 at 00:12, Lawrence D’Oliveiro <[email protected]>
wrote:

> Isn’t that what select <https://docs.python.org/3/library/select.html> is
> for?


select() will tell you whether there's space in a buffer to write to for a
given fd. But you can write to the master side of a pty regardless of what
the process in it is doing - type 'sleep 10' into bash, and then try typing
letters while it is doing nothing. We can't tell whether the process on the
other side of the pty is actually waiting for input, only that the input
buffer isn't full. That's why tools like pexpect can be used to look for
know patterns like 'password: '.

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOvn4qi4YFaTXUN9mW5m-a7%2B-rRdRnm0YWeS93Np3%3DRH9oFO2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to