Vale.py 文件源码

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

项目:SubVale 作者: ValeLint 项目源码 文件源码
def pipe_through_prog(cmd, path=None, stdin=''):
    """Run the Vale binary with the given command.
    """
    startupinfo = None
    if sublime.platform() == 'windows':
        startupinfo = subprocess.STARTUPINFO()
        startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
    p = subprocess.Popen(cmd, cwd=path, stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE,
                         stdin=subprocess.PIPE,
                         startupinfo=startupinfo)
    out, err = p.communicate(input=stdin.encode('utf-8'))
    return out.decode('utf-8'), err
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号