| Server IP : 172.67.207.176 / Your IP : 216.73.216.133 Web Server : Apache System : Linux infong-es77 4.4.400-icpu-108 #2 SMP Wed Feb 11 10:12:42 UTC 2026 x86_64 User : u67207989 ( 1351568) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/breezy/__pycache__/ |
Upload File : |
a
�*�^� � @ sX d dl mZ d dlZd dlZdZdZdd� Zddd d
ddd
dd�Zddd�Zdd� Z dS )� )�absolute_importNZrestructuredtextzTerminal control functionalityc C sV t jdkrdS t j�� sdS dd l} z| �� W n | jyF Y dS 0 t| �d��S )NZwin32Fr Zsetaf) �sys�platform�stdout�isatty�cursesZ setupterm�error�boolZtigetstr)r � r
�1/usr/lib/python3/dist-packages/breezy/terminal.py�has_ansi_colors s
r � 0� 1� 2� 3� 4� 5� 6� 7)ZblackZredZgreenZyellowZblueZmagentaZcyanZwhitec C sv g }|rF|� d�r*|�d� |dd� }n
|�d� |�dt| � |r\|�dt| � d�d d
�|�d| df�S )
a&
Returns a string using ANSI control codes to set the text color.
:param text: The text to set the color for.
:type text: string
:param fgcolor: The foreground color to use
:type fgcolor: string
:param bgcolor: The background color to use
:type bgcolor: string
Zdarkr
� Nr r r � s [� ;� ms [0m)�
startswith�append�colors�join)�textZfgcolorZbgcolor�coder
r
r �colorstring4 s
r c C s. t j�dd�}|�d�s |dkr(d| S t� S )NZTERM� ZxtermZdttermz]0;%s)�os�environ�getr �str)�titleZtermr
r
r �
term_titleP s r&