Lines Matching refs:index
99 index of actual lines start at 1, as with Tk. The methods never see this.
115 def index(self, index):
116 "Return string version of index decoded according to current text."
117 return "%s.%s" % self._decode(index, endflag=1)
119 def _decode(self, index, endflag=0):
122 This implements .index without converting the result back to a string.
126 The input index may have any of several possible forms:
135 if isinstance(index, (float, bytes)):
136 index = str(index)
138 index=index.lower()
140 raise TclError('bad text index "%s"' % index) from None
143 if index == 'insert':
145 elif index == 'end':
148 line, char = index.split('.')
151 # Out of bounds line becomes first or last ('end') index
164 # Out of bounds char becomes first or last index of line
176 0: position after terminal \n; for .get, .delete index 1
177 1: same viewed as beginning of non-existent next line (for .index)
186 def insert(self, index, chars):
187 "Insert chars before the character at index."
194 line, char = self._decode(index, -1)
222 Adjust default index2 ('index+1) for line ends.
272 def mark_set(self, name, index):
273 "Set mark *name* before the character at index."
292 def see(self, index):