本文整理汇总了Python中pip.commands.unzip.UnzipCommand.name方法的典型用法代码示例。如果您正苦于以下问题:Python UnzipCommand.name方法的具体用法?Python UnzipCommand.name怎么用?Python UnzipCommand.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pip.commands.unzip.UnzipCommand
的用法示例。
在下文中一共展示了UnzipCommand.name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_summaries
# 需要导入模块: from pip.commands.unzip import UnzipCommand [as 别名]
# 或者: from pip.commands.unzip.UnzipCommand 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)
示例2: get_similar_commands
# 需要导入模块: from pip.commands.unzip import UnzipCommand [as 别名]
# 或者: from pip.commands.unzip.UnzipCommand 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
示例3: get_summaries
# 需要导入模块: from pip.commands.unzip import UnzipCommand [as 别名]
# 或者: from pip.commands.unzip.UnzipCommand 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)
示例4: get_similar_commands
# 需要导入模块: from pip.commands.unzip import UnzipCommand [as 别名]
# 或者: from pip.commands.unzip.UnzipCommand 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