INNER CODE UNIT · Python

_script_cmd

pegasus-isi/pegasus · packages/pegasus-python/src/Pegasus/cli/main.py:60

def _script_cmd(name: str, script: str, help: str, *, worker: bool = False):
    """Return a Click command that delegates to a Python CLI script."""

    @click.command(
        name=name,
        help=help,
        add_help_option=False,
        context_settings=_PASSTHROUGH,
    )
    @click.argument("args", nargs=-1, type=click.UNPROCESSED)
    def _cmd(args):
        _run_script(script, args, search_worker=worker)

    return _cmd


def _binary_cmd(name: str, binary: str, help: str):
    """Return a Click command that delegates to a compiled binary."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…