当前位置: 首页>>代码示例>>Python>>正文


Python ZipCommand.name方法代码示例

本文整理汇总了Python中pip.commands.zip.ZipCommand.name方法的典型用法代码示例。如果您正苦于以下问题:Python ZipCommand.name方法的具体用法?Python ZipCommand.name怎么用?Python ZipCommand.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pip.commands.zip.ZipCommand的用法示例。


在下文中一共展示了ZipCommand.name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_summaries

# 需要导入模块: from pip.commands.zip import ZipCommand [as 别名]
# 或者: from pip.commands.zip.ZipCommand 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:sugarguo,项目名称:Flask_Blog,代码行数:15,代码来源:__init__.py

示例2: get_similar_commands

# 需要导入模块: from pip.commands.zip import ZipCommand [as 别名]
# 或者: from pip.commands.zip.ZipCommand 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:sugarguo,项目名称:Flask_Blog,代码行数:14,代码来源:__init__.py

示例3: get_summaries

# 需要导入模块: from pip.commands.zip import ZipCommand [as 别名]
# 或者: from pip.commands.zip.ZipCommand 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:mathur,项目名称:facebook-face-recognition,代码行数:15,代码来源:__init__.py

示例4: get_similar_commands

# 需要导入模块: from pip.commands.zip import ZipCommand [as 别名]
# 或者: from pip.commands.zip.ZipCommand 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:mathur,项目名称:facebook-face-recognition,代码行数:14,代码来源:__init__.py


注:本文中的pip.commands.zip.ZipCommand.name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。