Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/clint/textui/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/clint/textui/__pycache__/core.cpython-37.pyc

B

���U}�@s�dZddlmZddlZddlmZddlmZmZddl	m
Z
dd	lmZd
Z
ejjZejjZdZgZddd�Zddefdd�Zddefdd�Zdd�Zedd��Zddd�ZdS)zY
clint.textui.core
~~~~~~~~~~~~~~~~~

Core TextUI functionality for Puts/Indent/Writer.

�)�absolute_importN)�contextmanager�)�	max_width�	min_width)�columns�)�tsplit)	�puts�puts_err�indent�dedentrrr�STDOUT�STDERR)�
�
z
�� cCs`|dkr(d�t|�||t|�f�}n"d�dd|t|�t|�f�}t|�r\t�|�dS)z/Indent util function, compute new indent_stringrr����N)�join�str�len�INDENT_STRINGS�append)r�quote�indent_char�
indent_string�r�B/opt/alt/python37/lib/python3.7/site-packages/clint/textui/core.py�_indent$sr TcCsb|r4t|t�}tt|�}d�t�}td|��|�}d�d�t�t|�|rNdndf�}||�dS)zPrints given string to stdout.rrN)r	�NEWLINES�maprrr)�s�newline�streamr�_strrrrr
6s


r
cCst|||�dS)zPrints given string to stderr.N)r
)r#r$r%rrrrFsrcCst��dS)zPDedent next strings, use only if you use indent otherwise than as a
    context.N)r�poprrrrr
Jsr
ccsz
dVWdt�XdS)zIndentation context manager.N)r
rrrr�_indent_contextOs
r(�cCst||�t�S)z;Indentation manager, return an indentation context manager.)r r()rrrrrrWs
r)rrr)r)r)�__doc__�
__future__r�sys�
contextlibr�
formattersrr�colsr�utilsr	�__all__�stdout�writer�stderrrr!rr r
rr
r(rrrrr�<module>	s"