winpexpect.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:winpexpect 作者: geertj 项目源码 文件源码
def _child_reader(self, handle):
        """INTERNAL: Reader thread that reads stdout/stderr of the child
        process."""
        status = 'data'
        while True:
            try:
                err, data = ReadFile(handle, self.maxread)
                assert err == 0  # not expecting error w/o overlapped io
            except WindowsError, e:
                if e.winerror == ERROR_BROKEN_PIPE:
                    status = 'eof'
                    data = ''
                else:
                    status = 'error'
                    data = e.winerror
            self.child_output.put((handle, status, data))
            if status != 'data':
                break
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号