code: def system(cmd, data=None):
    '''
    pipes the output of a program
    '''
    import subprocess
    s = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
    out, err = s.communicate(data)
    return out.decode('utf8'f system(cmd, data=None):
    '''
    pipes the output of a program
    '''
    import subprocess
    s = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
    out, err = s.communicate(data)
    return out.decode('utf8')
docs: pipes the output of a program