ok
Direktori : /opt/alt/python36/lib64/python3.6/idlelib/__pycache__/ |
Current File : //opt/alt/python36/lib64/python3.6/idlelib/__pycache__/searchengine.cpython-36.pyc |
3 *j�a0 � @ s| d Z ddlZddlmZmZmZ ddljZdd� Z G dd� d�Z dd � Zd d� Zdd � Z edkrxddlmZ 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/python36/lib64/python3.6/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 j� S )N)r r )r r r r �getpat% s zSearchEngine.getpatc C s | j j|� d S )N)r �set)r �patr r r �setpat( s zSearchEngine.setpatc C s | j j� S )N)r r )r r r r �isre+ s zSearchEngine.isrec C s | j j� S )N)r r )r r r r �iscase. s zSearchEngine.iscasec C s | j j� S )N)r r )r r r r �isword1 s zSearchEngine.iswordc C s | j j� S )N)r r )r r r r �iswrap4 s zSearchEngine.iswrapc C s | j j� S )N)r r )r r r r �isback7 s zSearchEngine.isbackc C s | j � rtj|�}| j|� dS )z!Set pattern after escaping if re.N)r �re�escaper )r r r r r �setcookedpat<