U
    +cY                     @   s   d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlZddlZddl	Z	zddl
Z
dZW n ek
rx   dZY nX dd	 Ze	jd
re  dS )z7This module is used for enabling formatting on Windows.    )absolute_import)division)print_functionNTFc                  C   s   t rd} tj rt dkrd} tjj}d}|	t
j}tj }||t|dkr^d} |j|@ s|||j|B dkrd} tj| d n
dtjd< d	S )
z<Enables ANSI processing on Windows or disables it as needed.T10F   r   )wrap1ZANSI_COLORS_DISABLEDN)HAS_COLORAMAsysstdoutisattyplatformreleasectypeswindllkernel32ZGetStdHandle
subprocessZSTD_OUTPUT_HANDLEZwintypesZDWORDZGetConsoleModebyrefvalueZSetConsoleModecoloramainitosenviron)r   r   Z"enable_virtual_terminal_processingZ
out_handlemode r   ;/tmp/pip-unpacked-wheel-1xt1w7un/fire/formatting_windows.pyinitialize_or_disable"   s(    

 r   win)__doc__
__future__r   r   r   r   r   r   r   r
   r   r	   ImportErrorr   
startswithr   r   r   r   <module>   s    
