winpexpect.py 文件源码

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

项目:winpexpect 作者: geertj 项目源码 文件源码
def wait(self, timeout=None):
        """Wait until the child exits. If timeout is not specified this
        blocks indefinately. Otherwise, timeout specifies the number of
        seconds to wait."""
        if self.exitstatus is not None:
            return
        if timeout is None:
            timeout = INFINITE
        else:
            timeout = 1000 * timeout
        ret = WaitForSingleObject(self.child_handle, timeout)
        if ret == WAIT_TIMEOUT:
            raise TIMEOUT, 'Timeout exceeded in wait().'
        self.exitstatus = GetExitCodeProcess(self.child_handle)
        return self.exitstatus
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号