当前位置: 首页>>代码示例>>Python>>正文


Python helpers.SHOW_CURSOR属性代码示例

本文整理汇总了Python中pip._vendor.progress.helpers.SHOW_CURSOR属性的典型用法代码示例。如果您正苦于以下问题:Python helpers.SHOW_CURSOR属性的具体用法?Python helpers.SHOW_CURSOR怎么用?Python helpers.SHOW_CURSOR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在pip._vendor.progress.helpers的用法示例。


在下文中一共展示了helpers.SHOW_CURSOR属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: hidden_cursor

# 需要导入模块: from pip._vendor.progress import helpers [as 别名]
# 或者: from pip._vendor.progress.helpers import SHOW_CURSOR [as 别名]
def hidden_cursor(file):
    # The Windows terminal does not support the hide/show cursor ANSI codes,
    # even via colorama. So don't even try.
    if WINDOWS:
        yield
    # We don't want to clutter the output with control characters if we're
    # writing to a file, or if the user is running with --quiet.
    # See https://github.com/pypa/pip/issues/3418
    elif not file.isatty() or logger.getEffectiveLevel() > logging.INFO:
        yield
    else:
        file.write(HIDE_CURSOR)
        try:
            yield
        finally:
            file.write(SHOW_CURSOR) 
开发者ID:HaoZhang95,项目名称:Python24,代码行数:18,代码来源:ui.py

示例2: hidden_cursor

# 需要导入模块: from pip._vendor.progress import helpers [as 别名]
# 或者: from pip._vendor.progress.helpers import SHOW_CURSOR [as 别名]
def hidden_cursor(file):
    # type: (IO) -> Iterator[None]
    # The Windows terminal does not support the hide/show cursor ANSI codes,
    # even via colorama. So don't even try.
    if WINDOWS:
        yield
    # We don't want to clutter the output with control characters if we're
    # writing to a file, or if the user is running with --quiet.
    # See https://github.com/pypa/pip/issues/3418
    elif not file.isatty() or logger.getEffectiveLevel() > logging.INFO:
        yield
    else:
        file.write(HIDE_CURSOR)
        try:
            yield
        finally:
            file.write(SHOW_CURSOR) 
开发者ID:QData,项目名称:deepWordBug,代码行数:19,代码来源:ui.py


注:本文中的pip._vendor.progress.helpers.SHOW_CURSOR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。