MCPcopy Index your code
hub / github.com/python/cpython / find

Function find

Lib/idlelib/search.py:27–36  ·  view source on GitHub ↗

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.

(text)

Source from the content-addressed store, hash-verified

25 return engine._searchdialog
26
27def find(text):
28 """Open the search dialog.
29
30 Module-level function to access the singleton SearchDialog
31 instance and open the dialog. If text is selected, it is
32 used as the search phrase; otherwise, the previous entry
33 is used. No search is done with this command.
34 """
35 pat = text.get("sel.first", "sel.last")
36 return _setup(text).open(text, pat) # Open is inherited from SDBase.
37
38def find_again(text):
39 """Repeat the search for the last pattern and preferences.

Callers 1

test_findMethod · 0.50

Calls 3

_setupFunction · 0.70
getMethod · 0.45
openMethod · 0.45

Tested by 1

test_findMethod · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…