本文整理匯總了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.
################################################################