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

Function _setup

Lib/idlelib/search.py:12–25  ·  view source on GitHub ↗

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.

(text)

Source from the content-addressed store, hash-verified

10from idlelib.searchbase import SearchDialogBase
11
12def _setup(text):
13 """Return the new or existing singleton SearchDialog instance.
14
15 The singleton dialog saves user entries and preferences
16 across instances.
17
18 Args:
19 text: Text widget containing the text to be searched.
20 """
21 root = text._root()
22 engine = searchengine.get(root)
23 if not hasattr(engine, "_searchdialog"):
24 engine._searchdialog = SearchDialog(root, engine)
25 return engine._searchdialog
26
27def find(text):
28 """Open the search dialog.

Callers 4

findFunction · 0.70
find_againFunction · 0.70
find_selectionFunction · 0.70
show_findFunction · 0.70

Calls 3

SearchDialogClass · 0.85
_rootMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…