def METHOD_NAME(command, silent=False, env=None, cwd=None):
    """
    Execute the the build command and continuously write
    the output from the process to the standard output.
    """
    proc = subprocess.Popen(
        command,
        bufsize=-1,
        env=env,
        stdout=subprocess.PIPE,
        stderr=subprocess.STDOUT,
        cwd=cwd,
        shell=True,
        universal_newlines=True,
        encoding="utf-8",
        errors="ignore")
    while True:
        line = proc.stdout.readline()
        if not line and proc.poll() is not None:
            break
        if not silent:
            sys.stdout.write(line)
    return proc.returncode