def is_done(self):

        return (not self.wait_for_output or self.eof) and \
                not (hasattr(self.to_stream, 'needs_write') and self.to_stream.needs_write())
Returns True if the read stream is done (either it's returned EOF or
dataset/ETHPy150Open d11wtq/dockerpty/dockerpty/io.py/Pump.is_done