Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8fffa20

Browse files
author
Fredrik Lundh
committed
-- 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)
1 parent 5bd2cd6 commit 8fffa20

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Lib/lib-tk/Tkinter.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2838,11 +2838,11 @@ def xview_scroll(self, number, what):
28382838
"""Shift the x-view according to NUMBER which is measured
28392839
in "units" or "pages" (WHAT)."""
28402840
self.tk.call(self._w, 'xview', 'scroll', number, what)
2841-
def yview(self, *args):
2841+
def yview(self, *what):
28422842
"""Query and change vertical position of the view."""
2843-
if not args:
2843+
if not what:
28442844
return self._getdoubles(self.tk.call(self._w, 'yview'))
2845-
self.tk.call((self._w, 'yview') + args)
2845+
self.tk.call((self._w, 'yview') + what)
28462846
def yview_moveto(self, fraction):
28472847
"""Adjusts the view in the window so that FRACTION of the
28482848
total height of the canvas is off-screen to the top."""
@@ -3060,7 +3060,11 @@ def _test():
30603060
root = Tk()
30613061
text = "This is Tcl/Tk version %s" % TclVersion
30623062
if TclVersion >= 8.1:
3063-
text = text + u"\nThis should be a cedilla: \347"
3063+
try:
3064+
text = text + unicode("\nThis should be a cedilla: \347",
3065+
"iso-8859-1")
3066+
except NameError:
3067+
pass # no unicode support
30643068
label = Label(root, text=text)
30653069
label.pack()
30663070
test = Button(root, text="Click me!",

0 commit comments

Comments
 (0)