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, *, nolinestop=None, strictlimits=None)
| 4113 | self.tk.call(self._w, 'scan', 'dragto', x, y) |
| 4114 | |
| 4115 | def search(self, pattern, index, stopindex=None, |
| 4116 | forwards=None, backwards=None, exact=None, |
| 4117 | regexp=None, nocase=None, count=None, |
| 4118 | elide=None, *, nolinestop=None, strictlimits=None): |
| 4119 | """Search PATTERN beginning from INDEX until STOPINDEX. |
| 4120 | Return the index of the first character of a match or an |
| 4121 | empty string.""" |
| 4122 | args = [self._w, 'search'] |
| 4123 | if forwards: args.append('-forwards') |
| 4124 | if backwards: args.append('-backwards') |
| 4125 | if exact: args.append('-exact') |
| 4126 | if regexp: args.append('-regexp') |
| 4127 | if nocase: args.append('-nocase') |
| 4128 | if elide: args.append('-elide') |
| 4129 | if count: args.append('-count'); args.append(count) |
| 4130 | if nolinestop: args.append('-nolinestop') |
| 4131 | if strictlimits: args.append('-strictlimits') |
| 4132 | if pattern and pattern[0] == '-': args.append('--') |
| 4133 | args.append(pattern) |
| 4134 | args.append(index) |
| 4135 | if stopindex is not None: args.append(stopindex) |
| 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, |