當前位置: 首頁>>代碼示例>>Python>>正文


Python spinner.Spinner方法代碼示例

本文整理匯總了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.
################################################################ 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:24,代碼來源:ui.py

示例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.
################################################################ 
開發者ID:HaoZhang95,項目名稱:Python24,代碼行數:16,代碼來源:ui.py


注:本文中的pip._vendor.progress.spinner.Spinner方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。