MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / search

Method search

tools/python-3.11.9-amd64/Lib/tkinter/__init__.py:3890–3908  ·  view source on GitHub ↗

Search PATTERN beginning from INDEX until STOPINDEX. Return the index of the first character of a match or an empty string.

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

Source from the content-addressed store, hash-verified

3888 self.tk.call(self._w, 'scan', 'dragto', x, y)
3889
3890 def search(self, pattern, index, stopindex=None,
3891 forwards=None, backwards=None, exact=None,
3892 regexp=None, nocase=None, count=None, elide=None):
3893 """Search PATTERN beginning from INDEX until STOPINDEX.
3894 Return the index of the first character of a match or an
3895 empty string."""
3896 args = [self._w, 'search']
3897 if forwards: args.append('-forwards')
3898 if backwards: args.append('-backwards')
3899 if exact: args.append('-exact')
3900 if regexp: args.append('-regexp')
3901 if nocase: args.append('-nocase')
3902 if elide: args.append('-elide')
3903 if count: args.append('-count'); args.append(count)
3904 if pattern and pattern[0] == '-': args.append('--')
3905 args.append(pattern)
3906 args.append(index)
3907 if stopindex: args.append(stopindex)
3908 return str(self.tk.call(tuple(args)))
3909
3910 def see(self, index):
3911 """Scroll such that the character at INDEX is visible."""

Callers 15

_stringifyFunction · 0.45
test_searchMethod · 0.45
_parsegenMethod · 0.45
_parse_headersMethod · 0.45
formataddrFunction · 0.45
decode_headerFunction · 0.45
encodeMethod · 0.45
get_unstructuredFunction · 0.45
_formatparamFunction · 0.45
_make_boundaryMethod · 0.45
check_headersFunction · 0.45
_formatparamFunction · 0.45

Calls 4

strFunction · 0.85
tupleClass · 0.85
callMethod · 0.80
appendMethod · 0.45

Tested by 2

test_searchMethod · 0.36