INNER CODE UNIT · Python

run_raw

renezander030/capcut-cli · python/capcut/__init__.py:185

def run_raw(
    cmd: str,
    *args: Any,
    human: bool = False,
    timeout: Optional[float] = None,
    cwd: Optional[str] = None,
    input: Optional[str] = None,
    **flags: Any,
) -> Result:
    """Run one command and return the :class:`Result` whatever the exit status.

    ``human=True`` appends ``-H`` and leaves ``data`` as ``None`` (the table is in ``stdout``).
    """
    argv_args = [str(a) for a in args] + flag_args(flags) + (["-H"] if human else [])
    argv = cli_command() + [cmd] + argv_args
    proc = _spawn(argv, input=input, timeout=timeout, cwd=cwd)
    data = None if human else _parse(proc.stdout)
    if data is None and proc.returncode != 0:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…