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

Method open

Lib/idlelib/grep.py:90–110  ·  view source on GitHub ↗

Make dialog visible on top of others and ready to use. Extend the SearchDialogBase open() to set the initial value for globvar. Args: text: Multicall object containing the text information. searchphrase: String phrase to search. io: iomen

(self, text, searchphrase, io=None)

Source from the content-addressed store, hash-verified

88 self.recvar = BooleanVar(root)
89
90 def open(self, text, searchphrase, io=None):
91 """Make dialog visible on top of others and ready to use.
92
93 Extend the SearchDialogBase open() to set the initial value
94 for globvar.
95
96 Args:
97 text: Multicall object containing the text information.
98 searchphrase: String phrase to search.
99 io: iomenu.IOBinding instance containing file path.
100 """
101 SearchDialogBase.open(self, text, searchphrase)
102 if io:
103 path = io.filename or ""
104 else:
105 path = ""
106 dir, base = os.path.split(path)
107 head, tail = os.path.splitext(base)
108 if not tail:
109 tail = ".py"
110 self.globvar.set(os.path.join(dir, "*" + tail))
111
112 def create_entries(self):
113 "Create base entry widgets and add widget for search path."

Callers 15

execfileMethod · 0.45
mainFunction · 0.45
show_sourceMethod · 0.45
tabnannyMethod · 0.45
grepFunction · 0.45
python_docsMethod · 0.45
open_moduleMethod · 0.45
display_extra_helpMethod · 0.45
open_recent_fileMethod · 0.45
findFunction · 0.45
find_againMethod · 0.45
show_findFunction · 0.45

Calls 4

splitextMethod · 0.80
splitMethod · 0.45
setMethod · 0.45
joinMethod · 0.45

Tested by 1

test_open_and_closeMethod · 0.36