]> granicus.if.org Git - python/commitdiff
Last minute fix to Text.window_cget(), which should properly Tcl-ify
authorGuido van Rossum <guido@python.org>
Thu, 11 Dec 1997 17:08:52 +0000 (17:08 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 11 Dec 1997 17:08:52 +0000 (17:08 +0000)
the option name (prepend '-', strip trailing '_').

Lib/lib-tk/Tkinter.py

index e7e6bb937665caba638e6bad6a5b91ec48aa24ae..4c104c8d25a4df75a7196781b0a558604720f76c 100644 (file)
@@ -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: