def _readfds(self):
        fds = [self.__process.stdout.fileno(), self.__process.stderr.fileno()]
        streams = [self.__process.stdout, self.__process.stderr]

        while self.__process.poll() is None:
            fdsin, _, _ = select.select(fds, [], [])
            for fd in fdsin:
                output = [None, None]
                ind = fds.index(fd)
                stream = streams[ind]
                s = stream.readline()
                if len(s) > 0:
                    output[ind] = s
                    yield output
dataset/ETHPy150Open joonty/vim-do/autoload/python/async.py/AsyncProcessReader._readfds/original