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)
| 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.""" |