當前位置: 首頁>>代碼示例>>Python>>正文


Python CompletionCommand.name方法代碼示例

本文整理匯總了Python中pip.commands.completion.CompletionCommand.name方法的典型用法代碼示例。如果您正苦於以下問題:Python CompletionCommand.name方法的具體用法?Python CompletionCommand.name怎麽用?Python CompletionCommand.name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pip.commands.completion.CompletionCommand的用法示例。


在下文中一共展示了CompletionCommand.name方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_summaries

# 需要導入模塊: from pip.commands.completion import CompletionCommand [as 別名]
# 或者: from pip.commands.completion.CompletionCommand import name [as 別名]
def get_summaries(ordered=True):
    """Yields sorted (command name, command summary) tuples."""

    if ordered:
        cmditems = _sort_commands(commands_dict, commands_order)
    else:
        cmditems = commands_dict.items()

    for name, command_class in cmditems:
        yield (name, command_class.summary) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:12,代碼來源:__init__.py

示例2: get_similar_commands

# 需要導入模塊: from pip.commands.completion import CompletionCommand [as 別名]
# 或者: from pip.commands.completion.CompletionCommand import name [as 別名]
def get_similar_commands(name):
    """Command name auto-correct."""
    from difflib import get_close_matches

    name = name.lower()

    close_commands = get_close_matches(name, commands_dict.keys())

    if close_commands:
        return close_commands[0]
    else:
        return False 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:14,代碼來源:__init__.py

示例3: get_summaries

# 需要導入模塊: from pip.commands.completion import CompletionCommand [as 別名]
# 或者: from pip.commands.completion.CompletionCommand import name [as 別名]
def get_summaries(ignore_hidden=True, ordered=True):
    """Yields sorted (command name, command summary) tuples."""

    if ordered:
        cmditems = _sort_commands(commands, commands_order)
    else:
        cmditems = commands.items()

    for name, command_class in cmditems:
        if ignore_hidden and command_class.hidden:
            continue

        yield (name, command_class.summary) 
開發者ID:aliyun,項目名稱:oss-ftp,代碼行數:15,代碼來源:__init__.py

示例4: get_similar_commands

# 需要導入模塊: from pip.commands.completion import CompletionCommand [as 別名]
# 或者: from pip.commands.completion.CompletionCommand import name [as 別名]
def get_similar_commands(name):
    """Command name auto-correct."""
    from difflib import get_close_matches

    close_commands = get_close_matches(name, commands.keys())

    if close_commands:
        guess = close_commands[0]
    else:
        guess = False

    return guess 
開發者ID:aliyun,項目名稱:oss-ftp,代碼行數:14,代碼來源:__init__.py

示例5: get_summaries

# 需要導入模塊: from pip.commands.completion import CompletionCommand [as 別名]
# 或者: from pip.commands.completion.CompletionCommand import name [as 別名]
def get_summaries(ignore_hidden=True, ordered=True):
    """Yields sorted (command name, command summary) tuples."""

    if ordered:
        cmditems = _sort_commands(commands_dict, commands_order)
    else:
        cmditems = commands_dict.items()

    for name, command_class in cmditems:
        if ignore_hidden and command_class.hidden:
            continue

        yield (name, command_class.summary) 
開發者ID:chalasr,項目名稱:Flask-P2P,代碼行數:15,代碼來源:__init__.py


注:本文中的pip.commands.completion.CompletionCommand.name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。