← Back
Editing: color.cpython-311.pyc
� �|�e& � �� � d Z ddlZddlZddlZddlmZ ddlZ ej � � dZn# e e f$ r dZY nw xY wd� Z G d� d� � Zdd �Z ej d�� � d� � � Zdd �ZdS )z$ Sets up the terminal color scheme. � N)� termcolorsTFc �< � d� } t t j d� � ot j � � � }|o_t j dk pOt pHdt j v p:dt j v p,t j � d� � dk p | � � S )z_ Return True if the running system's terminal supports color, and False otherwise. c �� � ddl } | � | j d� � } | � |d� � \ }}|dk S # t $ r Y dS w xY w# t $ r Y dS w xY w)z� Check the Windows Registry to see if VT code handling has been enabled by default, see https://superuser.com/a/1300251/447564. r N�Console�VirtualTerminalLevel� F)�winreg�OpenKey�HKEY_CURRENT_USER�QueryValueEx�FileNotFoundError�ImportError)r �reg_key� reg_key_value�_s �>/usr/lib/python3/dist-packages/django/core/management/color.py�$vt_codes_enabled_in_windows_registryz<supports_color.<locals>.vt_codes_enabled_in_windows_registry s� � � *��M�M�M� �n�n�V�%=�y�I�I�G� *�#)�#6�#6�w�@V�#W�#W� � �q� %��)�)�� %� � � ��u�u� ����� � � � ��5�5� ���s"