From: Guido van Rossum Date: Thu, 11 Dec 1997 17:08:52 +0000 (+0000) Subject: Last minute fix to Text.window_cget(), which should properly Tcl-ify X-Git-Tag: v1.5b2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7814ea64ff151bcb8b233bc222c09e244f7095ab;p=python Last minute fix to Text.window_cget(), which should properly Tcl-ify the option name (prepend '-', strip trailing '_'). --- diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index e7e6bb9376..4c104c8d25 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -1625,6 +1625,10 @@ class Text(Widget): self.tk.call( self._w, 'tag', 'remove', tagName, index1, index2) def window_cget(self, index, option): + if option[:1] != '-': + option = '-' + option + if option[-1:] == '_': + option = option[:-1] return self.tk.call(self._w, 'window', 'cget', index, option) def window_configure(self, index, cnf={}, **kw): if type(cnf) == StringType: