o
    Ďi                     @   sv   d 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y)   dZY nw dd Z	ej
dr9e	  dS dS )z7This module is used for enabling formatting on Windows.    NTFc                  C   s   t rOd} ttjdrGtj rGt dkrGd} tjj	}d}|
tj}tj }||t|dkr5d} |j|@ sG|||j|B dkrGd} tj| d d
S dtjd	< d
S )z<Enables ANSI processing on Windows or disables it as needed.Tisatty10F   r   )wrap1ANSI_COLORS_DISABLEDN)HAS_COLORAMAhasattrsysstdoutr   platformreleasectypeswindllkernel32GetStdHandle
subprocessSTD_OUTPUT_HANDLEwintypesDWORDGetConsoleModebyrefvalueSetConsoleModecoloramainitosenviron)r   r   "enable_virtual_terminal_processing
out_handlemode r!   S/home/jeff/fluffinator/venv/lib/python3.10/site-packages/fire/formatting_windows.pyinitialize_or_disable   s,   


r#   win)__doc__r   r   r   r   r
   r   r   ImportErrorr#   
startswithr!   r!   r!   r"   <module>   s    
