diff options
author | Guido van Rossum <guido@python.org> | 1997-12-11 17:08:52 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-11 17:08:52 (GMT) |
commit | 7814ea64ff151bcb8b233bc222c09e244f7095ab (patch) | |
tree | 5f878fe2dba4831953ba0a0c2c0a006d9c0f3624 /Lib/lib-tk | |
parent | 9afad049e0a81b72fe2777c3aec8e3f577011d0e (diff) | |
download | cpython-7814ea64ff151bcb8b233bc222c09e244f7095ab.zip cpython-7814ea64ff151bcb8b233bc222c09e244f7095ab.tar.gz cpython-7814ea64ff151bcb8b233bc222c09e244f7095ab.tar.bz2 |
Last minute fix to Text.window_cget(), which should properly Tcl-ify
the option name (prepend '-', strip trailing '_').
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index e7e6bb9..4c104c8 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: |