diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index e18c05efa0d..5dd0c99b186 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -1464,6 +1464,10 @@ class Text(Widget): return self._bind((self._w, 'tag', 'bind', tagName), sequence, func, add) def tag_cget(self, tagName, option): + if option[:1] != '-': + option = '-' + option + if option[-1:] == '_': + option = option[:-1] return self.tk.call(self._w, 'tag', 'cget', tagName, option) def tag_config(self, tagName, cnf={}, **kw): if type(cnf) == StringType: diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py index e18c05efa0d..5dd0c99b186 100755 --- a/Lib/tkinter/Tkinter.py +++ b/Lib/tkinter/Tkinter.py @@ -1464,6 +1464,10 @@ class Text(Widget): return self._bind((self._w, 'tag', 'bind', tagName), sequence, func, add) def tag_cget(self, tagName, option): + if option[:1] != '-': + option = '-' + option + if option[-1:] == '_': + option = option[:-1] return self.tk.call(self._w, 'tag', 'cget', tagName, option) def tag_config(self, tagName, cnf={}, **kw): if type(cnf) == StringType: