INNER CODE UNIT · Python

calling_external_command

Yelp/paasta · paasta_tools/cli/cli.py:74

def calling_external_command():
    if len(sys.argv) > 1:
        return sys.argv[1] in list_external_commands()
    else:
        return False


def exec_subcommand(argv):
    command = sys.argv[1]
    os.execlp(f"paasta-{command}", *argv[1:])


def add_subparser(command, subparsers):
    """Given a command name, paasta_cmd, execute the add_subparser method
    implemented in paasta_cmd.py.

    Each paasta client command must implement a method called add_subparser.
    This allows the client to dynamically add subparsers to its subparser, which

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…