Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
U i_@sdZddlmZddlmZddlmZddZddZd d Z d d Z Gd ddeZ ddZ e dkrddlmZeddddddlmZee dS)zSearch dialog for Find, Find Again, and Find Selection functionality. Inherits from SearchDialogBase for GUI and uses searchengine to prepare search pattern. )TclError) searchengine)SearchDialogBasecCs.|}t|}t|ds(t|||_|jS)zReturn 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_rootrgethasattr SearchDialogr)textrootenginer -/opt/python38/lib/python3.8/idlelib/search.py_setup s    rcCs|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. sel.firstsel.last)rropen)r patr r r finds rcCst||S)aSRepeat 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_againr r r r r&s rcCst||S)aSearch for the selected pattern in the text. Module-level function to access the singleton SearchDialog instance to search using the selected text. With a text selection, perform the search without displaying the dialog. Without a selection, use the prior entry as the search phrase and don't display the dialog. If there has been no prior search, open the search dialog. )rfind_selectionrr r r r1s rc@s2eZdZdZddZd ddZddZd d ZdS) rz%Dialog for finding a pattern in text.cCs t||jd|jdddS)z=Create the base search dialog and add a button for Find Next.z Find NextT)ZisdefN)rcreate_widgetsZ make_buttondefault_command)selfr r r rAs zSearchDialog.create_widgetsNcCs|jsdS||jdS)z3Handle the Find Next button as the default command.N)r getprogrr )reventr r r rGs zSearchDialog.default_commandc Cs|js||dS|js&dS|j|}|r|\}}|\}}d||f}d||f}z6|d} |d} | |kr| |kr|WdSWntk rYnX| ddd| d||| d|j r|p|| dd S|dSd S) a2Repeat the last search. If no search was previously run, open a new search dialog. In this case, no search is done. If a search was previously run, the search dialog won't be shown and the options from the previous search (including the search pattern) will be used to find the next occurrence of the pattern. Next is relative based on direction. Position the window to display the located occurrence in the text. Return True if the search was successful and False otherwise. Fz%d.%drrsel1.0endinsertTN)r ZgetpatrrZ search_textspanindexZbellr tag_removetag_addZmark_setZisbackZsee) rr reslinemijfirstZlastZselfirstZsellastr r r rMs4           zSearchDialog.find_againcCs&|dd}|r|j|||S)a/Search for selected text with previous dialog preferences. Instead of using the same pattern for searching (as Find Again does), this first resets the pattern to the currently selected text. If the selected text isn't changed, then use the prior search phrase. rr)rr Z setcookedpatr)rr rr r r rys  zSearchDialog.find_selection)N)__name__ __module__ __qualname____doc__rrrrr r r r r>s  ,rc sddlm}m}ddlm}m}||}|dtt| ddd\}}| d||d f||}| ||d d   d d fdd} ||d| d} | dS)zDisplay search test box.r)ToplevelText)FrameButtonzTest SearchDialog+Nz+%d+%dZgray)Zinactiveselectbackgroundrz}This is a sample string. This is a sample string. This is a sample string. This is a sample string. This is a sample string. cs.dddtddddS)Nrrr)r#rrr"r rr r show_findsz!_search_dialog..show_findzSearch (selection ignored))r Zcommand) tkinterr.r/Z tkinter.ttkr0r1titlemapintZgeometrysplitpackr) parentr.r/r0r1topxyframer5Zbuttonr rr _search_dialogs     rA__main__)mainzidlelib.idle_test.test_searchF) verbosityexit)runN)r-r6rZidlelibrZidlelib.searchbaserrrrrrrAr*ZunittestrCZidlelib.idle_test.htestrGr r r r s      I