本文整理匯總了Python中pip.commands.bundle.BundleCommand.name方法的典型用法代碼示例。如果您正苦於以下問題:Python BundleCommand.name方法的具體用法?Python BundleCommand.name怎麽用?Python BundleCommand.name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pip.commands.bundle.BundleCommand
的用法示例。
在下文中一共展示了BundleCommand.name方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_summaries
# 需要導入模塊: from pip.commands.bundle import BundleCommand [as 別名]
# 或者: from pip.commands.bundle.BundleCommand 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.bundle import BundleCommand [as 別名]
# 或者: from pip.commands.bundle.BundleCommand 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