diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2000-08-09 18:51:01 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2000-08-09 18:51:01 (GMT) |
commit | 8fffa208e04e347e5a560e5ca3b6f6d4c57097b2 (patch) | |
tree | c85153c17c31dbf75d9517c78e4e8da00a02f3e2 /Lib/lib-tk/Tkinter.py | |
parent | 5bd2cd663dad454da19f66ccde3ac6a3ee8aa6a6 (diff) | |
download | cpython-8fffa208e04e347e5a560e5ca3b6f6d4c57097b2.zip cpython-8fffa208e04e347e5a560e5ca3b6f6d4c57097b2.tar.gz cpython-8fffa208e04e347e5a560e5ca3b6f6d4c57097b2.tar.bz2 |
-- use explicit conversion instead of u-string literal in the test
code, to make the new Tkinter.py run under 1.5.2
-- changed Text.yview argument name (for consistency with xview)
Diffstat (limited to 'Lib/lib-tk/Tkinter.py')
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 4f8e479..be01677 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -2838,11 +2838,11 @@ class Text(Widget): """Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).""" self.tk.call(self._w, 'xview', 'scroll', number, what) - def yview(self, *args): + def yview(self, *what): """Query and change vertical position of the view.""" - if not args: + if not what: return self._getdoubles(self.tk.call(self._w, 'yview')) - self.tk.call((self._w, 'yview') + args) + self.tk.call((self._w, 'yview') + what) def yview_moveto(self, fraction): """Adjusts the view in the window so that FRACTION of the total height of the canvas is off-screen to the top.""" @@ -3060,7 +3060,11 @@ def _test(): root = Tk() text = "This is Tcl/Tk version %s" % TclVersion if TclVersion >= 8.1: - text = text + u"\nThis should be a cedilla: \347" + try: + text = text + unicode("\nThis should be a cedilla: \347", + "iso-8859-1") + except NameError: + pass # no unicode support label = Label(root, text=text) label.pack() test = Button(root, text="Click me!", |