관리-도구
편집 파일: colorizer.cpython-37.pyc
B � f�2 � @ s� d dl Z d dlZd dlZd dlZd dlmZ d dlmZ dZdd� Z dd� Z e�e � ej�Z e�d ej�Zd d� ZG dd � d e�Zdd� Zedkr�d dlmZ edddd� d dlmZ ee� dS )� N)�idleConf)� DelegatorFc C s d| d� |� d S )z9Return a named group pattern matching list of alternates.z(?P<%s>�|�))�join)�nameZ alternates� r �6/opt/alt/python37/lib64/python3.7/idlelib/colorizer.py�any s r c C s� dt dtj� d } dd� tt�D �}dt d|� d }t ddg�}d }|d }|d }|d }|d }t d||||g�} | d | d | d | d t ddg� S )Nz\b�KEYWORDc S s( g | ] }|� d �s|tjkrt|��qS )�_)� startswith�keyword�kwlist�str)�.0r r r r � <listcomp> s zmake_pat.<locals>.<listcomp>z([^.'\"\\#]\b|^)�BUILTIN�COMMENTz#[^\n]*z(?i:r|u|f|fr|rf|b|br|rb)?z'[^'\\\n]*(\\.[^'\\\n]*)*'?z"[^"\\\n]*(\\.[^"\\\n]*)*"?z''''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?z'"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?�STRINGr �SYNCz\n)r r r �dir�builtins) �kwZbuiltinlist�builtin�commentZstringprefixZsqstringZdqstringZ sq3stringZ dq3string�stringr r r �make_pat s r z\s+(\w+)c C s^ t �� }t �|d�}t �|d�d }t �|d�}| j|d |d ||d |d |d d� dS )zcSet color options of Text widget. If ColorDelegator is used, this should be called first. ZnormalZcursor� foregroundZhilite� background)r r ZinsertbackgroundZselectforegroundZselectbackgroundZinactiveselectbackgroundN)r �CurrentTheme�GetHighlightZconfig)�text�themeZ normal_colorsZcursor_colorZ select_colorsr r r �color_config"