◐ Shell
clean mode source ↗

Message 161409 - Python tracker

> How would this differ from the normal communicate()?

It would block until one of the following occurs:

* some data has been written to stdin,
* some data has been read from stdout or stderr, or
* timeout passes (if timeout is not None).

The normal communicate() could be implemented by running this in a loop.  The amount of data returned at once could be limited by an argument of the constructor.