B
    ,DbM                 @   sx  d Z ddlmZ ddlmZ ddlZeeeddddd	dd
dgee	ddZ
e
d= eeeddddddddgee	ddZeeeddddddddgee	d d!Zd"ZdLd#d$ZdMd%d&Zed'krted(ed)  ed* ed+d ed,d ed-d ed.d ed/d ed0d ed1d ed2d ed3 ed4 ed5dd6 ed7dd6 ed8dd6 ed9dd6 ed:dd6 ed;dd6 ed<dd6 ed=ddd> ed3 ed? ed@ddgdA edBddgdA edCddgdA edDdd	gdA edEdd
gdA edFddgdA edGdddd
gdA edHddd	dgdA ed3 edI edJdddg edKddd
g dS )Nz.ANSII Color formatting for output in terminal.    )print_function)settingsNZboldZdark Z	underlineZblinkreverseZ	concealed   	   Zon_greyZon_redZon_greenZ	on_yellowZon_blueZ
on_magentaZon_cyanZon_white(   0   ZgreyZredZgreenZyellowZblueZmagentaZcyanZwhite   &   z[0mc             C   st   t ddkrpd}|dk	r*|t| | f } |dk	rB|t| | f } |dk	rhx|D ]}|t| | f } qPW | t7 } | S )a  Colorize text.

    Available text colors:
        red, green, yellow, blue, magenta, cyan, white.

    Available text highlights:
        on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white.

    Available attributes:
        bold, dark, underline, blink, reverse, concealed.

    Example:
        colored('Hello, World!', 'red', 'on_grey', ['blue', 'blink'])
        colored('Hello, World!', 'green')
    ZANSI_COLORS_DISABLEDNz[%dm%s)osgetenvCOLORS
HIGHLIGHTS
ATTRIBUTESRESET)textcoloron_colorattrsZfmt_strattr r   ;G:\easytimepro\master/mysite/_utils\termcolor\term_color.pycolored=   s    
r   c             K   s    t jrtt| |||f| dS )zFPrint colorize text.

    It accepts arguments of print function.
    N)r   DEBUGprintr   )r   r   r   r   kwargsr   r   r   cprint]   s    r   __main__zCurrent terminal type: %sZTERMzTest basic colors:z
Grey colorz	Red colorzGreen colorzYellow colorz
Blue colorzMagenta colorz
Cyan colorzWhite colorzN------------------------------------------------------------------------------zTest highlights:zOn grey color)r   zOn red colorzOn green colorzOn yellow colorzOn blue colorzOn magenta colorzOn cyan colorzOn white color)r   r   zTest attributes:zBold grey color)r   zDark red colorzUnderline green colorzBlink yellow colorzReversed blue colorzConcealed Magenta colorz!Bold underline reverse cyan colorz Dark blink concealed white colorzTest mixing:zUnderline red on grey colorzReversed green on red color)NNN)NNN)__doc__Z
__future__r   Zdjango.confr   r   dictlistzipranger   r   r   r   r   r   __name__r   r   r   r   r   r   <module>   s   
 
	








