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)
| 4027 | self.tk.call(self._w, 'scan', 'dragto', x, y) |
| 4028 | |
| 4029 | def search(self, pattern, index, stopindex=None, |
| 4030 | forwards=None, backwards=None, exact=None, |
| 4031 | regexp=None, nocase=None, count=None, elide=None): |
| 4032 | """Search PATTERN beginning from INDEX until STOPINDEX. |
| 4033 | Return the index of the first character of a match or an |
| 4034 | empty string.""" |
| 4035 | args = [self._w, 'search'] |
| 4036 | if forwards: args.append('-forwards') |
| 4037 | if backwards: args.append('-backwards') |
| 4038 | if exact: args.append('-exact') |
| 4039 | if regexp: args.append('-regexp') |
| 4040 | if nocase: args.append('-nocase') |
| 4041 | if elide: args.append('-elide') |
| 4042 | if count: args.append('-count'); args.append(count) |
| 4043 | if pattern and pattern[0] == '-': args.append('--') |
| 4044 | args.append(pattern) |
| 4045 | args.append(index) |
| 4046 | if stopindex: args.append(stopindex) |
| 4047 | return str(self.tk.call(tuple(args))) |
| 4048 | |
| 4049 | def see(self, index): |
| 4050 | """Scroll such that the character at INDEX is visible.""" |