관리-도구
편집 파일: searchengine.cpython-37.opt-1.pyc
B � f0 � @ s~ d Z ddlZddlmZmZmZ ddlmZ dd� Z G dd� d�Z dd � Zd d� Zdd � Z edkrzddlmZ eddd� dS )z'Define SearchEngine for search dialogs.� N)� StringVar� BooleanVar�TclErrorc C s t | d�st| �| _| jS )z�Return the singleton SearchEngine instance for the process. The single SearchEngine saves settings between dialog instances. If there is not a SearchEngine already, make one. � _searchengine)�hasattr�SearchEnginer )�root� r �9/opt/alt/python37/lib64/python3.7/idlelib/searchengine.py�get s r c @ s� e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dd� Zd#dd�Zd$dd�Zd%dd �Zd&d!d"�ZdS )'r z<Handles searching a text widget for Find, Replace, and Grep.c C sR || _ t|d�| _t|d�| _t|d�| _t|d�| _t|d�| _t|d�| _dS )z�Initialize Variables that save search state. The dialogs bind these to the UI elements present in the dialogs. � FTN) r r �patvarr �revar�casevar�wordvar�wrapvar�backvar)�selfr r r r �__init__ s zSearchEngine.__init__c C s | j �� S )N)r r )r r r r �getpat% s zSearchEngine.getpatc C s | j �|� d S )N)r �set)r �patr r r �setpat( s zSearchEngine.setpatc C s | j �� S )N)r r )r r r r �isre+ s zSearchEngine.isrec C s | j �� S )N)r r )r r r r �iscase. s zSearchEngine.iscasec C s | j �� S )N)r r )r r r r �isword1 s zSearchEngine.iswordc C s | j �� S )N)r r )r r r r �iswrap4 s zSearchEngine.iswrapc C s | j �� S )N)r r )r r r r �isback7 s zSearchEngine.isbackc C s | � � rt�|�}| �|� dS )z!Set pattern after escaping if re.N)r �re�escaper )r r r r r �setcookedpat<