From f5d902fc4763f7c5142a2be4c3ef62f2b8b29289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 1 Jan 2008 21:08:18 +0000 Subject: [PATCH] Always convert Text.index result to string. This improves compatibility with Tcl 8.5, which would otherwise return textindex objects. --- Lib/lib-tk/Tkinter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index f3f99f4121e..3ec3407a4bc 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -2981,7 +2981,7 @@ class Text(Widget): return self.tk.call(self._w, "image", "names") def index(self, index): """Return the index in the form line.char for INDEX.""" - return self.tk.call(self._w, 'index', index) + return str(self.tk.call(self._w, 'index', index)) def insert(self, index, chars, *args): """Insert CHARS before the characters at INDEX. An additional tag can be given in ARGS. Additional CHARS and tags can follow in ARGS."""