vrmilter.py 文件源码

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

项目:sipxecs-voicemail-transcription 作者: andrewsauder 项目源码 文件源码
def exec_cmd(cmd, **kwds):
    """
    Execute arbitrary commands as sub-processes.
    """
    stdin = kwds.get('stdin', None)
    stdin_flag = None
    if not stdin is None:
        stdin_flag = subprocess.PIPE
    proc = subprocess.Popen(
        cmd,
        stdin=stdin_flag,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE)
    stdout, stderr = proc.communicate(stdin)
    return (proc.returncode, stdout, stderr)


#=======================================================================
# Extend the Milter Class (where the email is captured)
#=======================================================================
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号