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

Method open

Lib/idlelib/searchbase.py:51–66  ·  view source on GitHub ↗

Make dialog visible on top of others and ready to use.

(self, text, searchphrase=None)

Source from the content-addressed store, hash-verified

49 self.top = None
50
51 def open(self, text, searchphrase=None):
52 "Make dialog visible on top of others and ready to use."
53 self.text = text
54 if not self.top:
55 self.create_widgets()
56 else:
57 self.top.deiconify()
58 self.top.tkraise()
59 self.top.transient(text.winfo_toplevel())
60 if searchphrase:
61 self.ent.delete(0,"end")
62 self.ent.insert("end",searchphrase)
63 self.ent.focus_set()
64 self.ent.selection_range(0, "end")
65 self.ent.icursor(0)
66 self.top.grab_set()
67
68 def close(self, event=None):
69 "Put dialog away for later use."

Callers

nothing calls this directly

Calls 9

create_widgetsMethod · 0.95
winfo_toplevelMethod · 0.80
grab_setMethod · 0.80
tkraiseMethod · 0.45
deleteMethod · 0.45
insertMethod · 0.45
focus_setMethod · 0.45
selection_rangeMethod · 0.45
icursorMethod · 0.45

Tested by

no test coverage detected