diff options
author | Georg Brandl <georg@python.org> | 2010-10-25 17:50:20 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-10-25 17:50:20 (GMT) |
commit | 856023a098c60ba0d2bcfd01c5cd8ccff7db97b5 (patch) | |
tree | e2af1c1b988b218c1408fac9db4b3dc3465819ea /Demo/tkinter/matt | |
parent | 07e4f1565b8d922fe0df5cf3a15e113f7c562046 (diff) | |
download | cpython-856023a098c60ba0d2bcfd01c5cd8ccff7db97b5.zip cpython-856023a098c60ba0d2bcfd01c5cd8ccff7db97b5.tar.gz cpython-856023a098c60ba0d2bcfd01c5cd8ccff7db97b5.tar.bz2 |
#3018: tkinter demo fixes for py3k.
Diffstat (limited to 'Demo/tkinter/matt')
-rw-r--r-- | Demo/tkinter/matt/bind-w-mult-calls-p-type.py | 1 | ||||
-rw-r--r-- | Demo/tkinter/matt/entry-with-shared-variable.py | 3 | ||||
-rw-r--r-- | Demo/tkinter/matt/pong-demo-1.py | 2 | ||||
-rw-r--r-- | Demo/tkinter/matt/printing-coords-of-items.py | 2 |
4 files changed, 2 insertions, 6 deletions
diff --git a/Demo/tkinter/matt/bind-w-mult-calls-p-type.py b/Demo/tkinter/matt/bind-w-mult-calls-p-type.py index af0ec81..0da7c37 100644 --- a/Demo/tkinter/matt/bind-w-mult-calls-p-type.py +++ b/Demo/tkinter/matt/bind-w-mult-calls-p-type.py @@ -1,5 +1,4 @@ from tkinter import * -import string # This program shows how to use a simple type-in box diff --git a/Demo/tkinter/matt/entry-with-shared-variable.py b/Demo/tkinter/matt/entry-with-shared-variable.py index 473a596..7d93da7 100644 --- a/Demo/tkinter/matt/entry-with-shared-variable.py +++ b/Demo/tkinter/matt/entry-with-shared-variable.py @@ -1,5 +1,4 @@ from tkinter import * -import string # This program shows how to make a typein box shadow a program variable. @@ -35,7 +34,7 @@ class App(Frame): # because it's being looked at by the entry widget, changing # the variable changes the entry widget display automatically. # the strange get/set operators are clunky, true... - str = string.upper(self.contents.get()) + str = self.contents.get().upper() self.contents.set(str) def print_contents(self, event): diff --git a/Demo/tkinter/matt/pong-demo-1.py b/Demo/tkinter/matt/pong-demo-1.py index 09f9f2e..82a5dc0 100644 --- a/Demo/tkinter/matt/pong-demo-1.py +++ b/Demo/tkinter/matt/pong-demo-1.py @@ -1,7 +1,5 @@ from tkinter import * -import string - class Pong(Frame): def createWidgets(self): diff --git a/Demo/tkinter/matt/printing-coords-of-items.py b/Demo/tkinter/matt/printing-coords-of-items.py index 26a4649..771a60d 100644 --- a/Demo/tkinter/matt/printing-coords-of-items.py +++ b/Demo/tkinter/matt/printing-coords-of-items.py @@ -35,7 +35,7 @@ class Test(Frame): # the "current" tag is applied to the object the cursor is over. # this happens automatically. self.draw.itemconfig(CURRENT, fill="red") - print(self.draw.coords(CURRENT)) + print(list(self.draw.coords(CURRENT))) def mouseLeave(self, event): # the "current" tag is applied to the object the cursor is over. |