B
uW @ s d Z ddlZddlZddlZddlmZmZ ddlmZ ddl m
Z
ddlmZ dddZ
d d
Zdd ZG d
d de
Zdd ZedkrddlmZ edddd ddlmZ ee dS )zGrep dialog for Find in Files functionality.
Inherits from SearchDialogBase for GUI and uses searchengine
to prepare search pattern.
N) StringVar
BooleanVar)Checkbutton)SearchDialogBase)searchenginec C sN | }t|}t|ds*t||||_|j}| dd}|| || dS )a Open the Find in Files dialog.
Module-level function to access the singleton GrepDialog
instance and open the dialog. If text is selected, it is
used as the search phrase; otherwise, the previous entry
is used.
Args:
text: Text widget that contains the selected text for
default search phrase.
io: iomenu.IOBinding instance with default path to search.
flist: filelist.FileList instance for OutputWindow parent.
_grepdialogz sel.firstzsel.lastN)Z_rootr gethasattr
GrepDialogr open)textioflistrootengineZdialogsearchphrase r 1/opt/alt/python37/lib64/python3.7/idlelib/grep.pygrep s
r c C s t | dS )zHandle os.walk error.N)print)msgr r r
walk_error+ s r c # sB x