applib.py 文件源码

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

项目:log-with-git 作者: iesugrace 项目源码 文件源码
def get_status_text_output(cmd):
    """ Run the cmd, return the output as a list of lines
    as well as the stat of the cmd (True or False), content
    of the out will be decoded.
    """
    stat, output = subprocess.getstatusoutput(cmd)
    if stat == 0:
        output = output.split('\n') if output else []
        res    = (True, output)
    else:
        res    = (False, [])
    return res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号