def METHOD_NAME(progname, *args):
    with subprocess.Popen([progname.replace("%ARCH", ARMAsm.ARCH)] + list(args),
            stdout=subprocess.PIPE) as proc:
        for line in proc.stdout:
            yield line.decode("ascii")
        proc.wait()
        if proc.returncode:
            raise Exception(f"{progname} (args: {args}) exited with status {proc.returncode}")