本文整理汇总了Python中pip._vendor.progress.spinner.Spinner方法的典型用法代码示例。如果您正苦于以下问题:Python spinner.Spinner方法的具体用法?Python spinner.Spinner怎么用?Python spinner.Spinner使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pip._vendor.progress.spinner
的用法示例。
在下文中一共展示了spinner.Spinner方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update
# 需要导入模块: from pip._vendor.progress import spinner [as 别名]
# 或者: from pip._vendor.progress.spinner import Spinner [as 别名]
def update(self):
message = self.message % self
phase = self.next_phase()
suffix = self.suffix % self
line = ''.join([
message,
" " if message else "",
phase,
" " if suffix else "",
suffix,
])
self.writeln(line)
################################################################
# Generic "something is happening" spinners
#
# We don't even try using progress.spinner.Spinner here because it's actually
# simpler to reimplement from scratch than to coerce their code into doing
# what we need.
################################################################
示例2: DownloadProgressProvider
# 需要导入模块: from pip._vendor.progress import spinner [as 别名]
# 或者: from pip._vendor.progress.spinner import Spinner [as 别名]
def DownloadProgressProvider(progress_bar, max=None):
if max is None or max == 0:
return BAR_TYPES[progress_bar][1]().iter
else:
return BAR_TYPES[progress_bar][0](max=max).iter
################################################################
# Generic "something is happening" spinners
#
# We don't even try using progress.spinner.Spinner here because it's actually
# simpler to reimplement from scratch than to coerce their code into doing
# what we need.
################################################################