示例#1
0
文件: CLI.py 项目: Larch-Team/Larch
def do_plug_list_all(session: engine.Session) -> str:
    """Lists all the plugins that can be connected to all of the Sockets"""
    strings = []
    for i in session.get_socket_names():
        plugins = "; ".join(session.plug_list(i))
        strings.append(f"Plugins available locally for {i}:\n{plugins}")
    return "\n\n".join(strings)
示例#2
0
文件: CLI.py 项目: Larch-Team/Larch
def do_plug_list(session: engine.Session, socket: str) -> str:
    """Lists all the plugins that can be connected to a socket

    Arguments:
        - Socket name [str]
    """
    try:
        plugins = "; ".join(session.plug_list(socket))
    except engine.EngineError as e:
        return str(e)
    else:
        return f"Plugins available locally for {socket}:\n{plugins}"