← Back
Editing: _termui_impl.cpython-38.pyc
U x6�[�L � @ s@ d Z ddlZddlZddlZddlZddlZddlmZmZm Z m Z mZmZm Z mZmZmZmZ ddlmZ ddlmZ ejdkr�dZd Znd ZdZdd � ZG dd� de�Zd%dd�Zdd� Zdd� Zdd� ZG dd� de�Z d&dd�Z!dd� Z"e�rddl#Z#ej$dd � �Z%d!d"� Z&n&ddl'Z'ddl(Z(ej$d#d � �Z%d$d"� Z&dS )'uA click._termui_impl ~~~~~~~~~~~~~~~~~~ This module contains implementations for the termui module. To keep the import time of Click down, some infrequently used functionality is placed in this module and only imported as needed. :copyright: © 2014 by the Pallets team. :license: BSD, see LICENSE.rst for more details. � N� )�_default_text_stdout� range_type�PY2�isatty�open_stream� strip_ansi�term_len�get_best_encoding�WIN� int_types�CYGWIN)�echo)�ClickException�nt� � z [?25lz[?25h c C s� z t | �W S ttfk r� zt| �j}W n tk rD Y Y dS X z|| �}W n tk rj Y Y dS X |tks�t|t�r�|dk r�Y dS | Y S X dS )z%Returns the length hint of an object.Nr )�len�AttributeError� TypeError�type�__length_hint__�NotImplemented� isinstancer )�objZget_hintZhint� r �4/usr/lib/python3/dist-packages/click/_termui_impl.py�_length_hint"