diff options
author | Guido van Rossum <guido@python.org> | 1996-11-11 19:10:58 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-11-11 19:10:58 (GMT) |
commit | 73eba25f5f9402f0ec276a1ce186df108fef984e (patch) | |
tree | 51d1e5a56170776d128f2ceae631401731621e7f | |
parent | c5d7e80739fdaed472955ca2d3d4933c27ab879b (diff) | |
download | cpython-73eba25f5f9402f0ec276a1ce186df108fef984e.zip cpython-73eba25f5f9402f0ec276a1ce186df108fef984e.tar.gz cpython-73eba25f5f9402f0ec276a1ce186df108fef984e.tar.bz2 |
Don't require leading '-' on option name to Text.tag_cget
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 4 | ||||
-rwxr-xr-x | Lib/tkinter/Tkinter.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index e18c05e..5dd0c99 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 e18c05e..5dd0c99 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: |