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

Method search_all

Lib/tkinter/__init__.py:4138–4161  ·  view source on GitHub ↗

Search all occurrences of PATTERN from INDEX to STOPINDEX. Return a tuple of indices where matches begin.

(self, pattern, index, stopindex=None, *,
            forwards=None, backwards=None, exact=None,
            regexp=None, nocase=None, count=None,
            elide=None, nolinestop=None, overlap=None,
            strictlimits=None)

Source from the content-addressed store, hash-verified

4136 return str(self.tk.call(tuple(args)))
4137
4138 def search_all(self, pattern, index, stopindex=None, *,
4139 forwards=None, backwards=None, exact=None,
4140 regexp=None, nocase=None, count=None,
4141 elide=None, nolinestop=None, overlap=None,
4142 strictlimits=None):
4143 """Search all occurrences of PATTERN from INDEX to STOPINDEX.
4144 Return a tuple of indices where matches begin."""
4145 args = [self._w, 'search', '-all']
4146 if forwards: args.append('-forwards')
4147 if backwards: args.append('-backwards')
4148 if exact: args.append('-exact')
4149 if regexp: args.append('-regexp')
4150 if nocase: args.append('-nocase')
4151 if elide: args.append('-elide')
4152 if count: args.append('-count'); args.append(count)
4153 if nolinestop: args.append('-nolinestop')
4154 if overlap: args.append('-overlap')
4155 if strictlimits: args.append('-strictlimits')
4156 if pattern and pattern[0] == '-': args.append('--')
4157 args.append(pattern)
4158 args.append(index)
4159 if stopindex is not None: args.append(stopindex)
4160 result = self.tk.call(tuple(args))
4161 return self.tk.splitlist(result)
4162
4163 def see(self, index):
4164 """Scroll such that the character at INDEX is visible."""

Callers 1

test_search_allMethod · 0.80

Calls 3

splitlistMethod · 0.80
appendMethod · 0.45
callMethod · 0.45

Tested by 1

test_search_allMethod · 0.64