| Server IP : 3.138.164.131 / Your IP : 216.73.216.136 Web Server : Apache System : Linux ns1.techtime.me 4.18.0-147.8.1.el8.lve.1.x86_64 #1 SMP Mon Jun 29 09:55:57 EDT 2020 x86_64 User : injazaat ( 1471) PHP Version : 8.1.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python37/lib64/python3.7/idlelib/__pycache__/ |
Upload File : |
B
r}�c0 � @ 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<