def popen2(cmd, bufsize=0, mode="t"):
    """Executes cmd as a sub-process. Returns the file objects (child_stdout, child_stdin)."""
    command = _get_str(cmd)
    i, o = os_popen.popen2(None, command, mode, bufsize)
    return o, i
Executes cmd as a sub-process. Returns the file objects (child_stdout, child_stdin).
lib/mlpatches/modules/popen2.py