ok
Direktori : /proc/thread-self/root/opt/alt/python37/lib64/python3.7/idlelib/__pycache__/ |
Current File : //proc/thread-self/root/opt/alt/python37/lib64/python3.7/idlelib/__pycache__/search.cpython-37.pyc |
B � f� � @ s� d Z ddlmZ ddlmZ ddlmZ dd� Zdd� Zd d � Z dd� Z G d d� de�Zdd� Ze dkr�ddlmZ edddd� ddlmZ ee� dS )z�Search dialog for Find, Find Again, and Find Selection functionality. Inherits from SearchDialogBase for GUI and uses searchengine to prepare search pattern. � )�TclError)�searchengine)�SearchDialogBasec C s. | � � }t�|�}t|d�s(t||�|_|jS )z�Return the new or existing singleton SearchDialog instance. The singleton dialog saves user entries and preferences across instances. Args: text: Text widget containing the text to be searched. � _searchdialog)Z_rootr �get�hasattr�SearchDialogr )�text�root�engine� r �3/opt/alt/python37/lib64/python3.7/idlelib/search.py�_setup s r c C s | � dd�}t| ��| |�S )a Open the search dialog. Module-level function to access the singleton SearchDialog instance and open the dialog. If text is selected, it is used as the search phrase; otherwise, the previous entry is used. No search is done with this command. z sel.firstzsel.last)r r �open)r �patr r r �find s r c C s t | ��| �S )aS Repeat the search for the last pattern and preferences. Module-level function to access the singleton SearchDialog instance to search again using the user entries and preferences from the last dialog. If there was no prior search, open the search dialog; otherwise, perform the search without showing the dialog. )r � find_again)r r r r r &