diff options
author | Georg Brandl <georg@python.org> | 2008-05-17 15:30:35 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-17 15:30:35 (GMT) |
commit | a9c205dd463c68b04c5946c0a112f67fcd5eda73 (patch) | |
tree | c061be6dc823c6836f9ac5bbeba22bf0fd9381a6 /Lib | |
parent | 8291f8efae5be43333ed1c92b158da0e49bdc4ef (diff) | |
download | cpython-a9c205dd463c68b04c5946c0a112f67fcd5eda73.zip cpython-a9c205dd463c68b04c5946c0a112f67fcd5eda73.tar.gz cpython-a9c205dd463c68b04c5946c0a112f67fcd5eda73.tar.bz2 |
Move imports to file top.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/tkinter/simpledialog.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/tkinter/simpledialog.py b/Lib/tkinter/simpledialog.py index f6fce09..40be5c8 100644 --- a/Lib/tkinter/simpledialog.py +++ b/Lib/tkinter/simpledialog.py @@ -254,8 +254,8 @@ class _QueryDialog(Dialog): parent = None): if not parent: - import Tkinter - parent = Tkinter._default_root + import tkinter + parent = tkinter._default_root self.prompt = prompt self.minvalue = minvalue @@ -285,12 +285,12 @@ class _QueryDialog(Dialog): def validate(self): - import tkMessageBox + from tkinter import messagebox try: result = self.getresult() except ValueError: - tkMessageBox.showwarning( + messagebox.showwarning( "Illegal value", self.errormessage + "\nPlease try again", parent = self @@ -298,7 +298,7 @@ class _QueryDialog(Dialog): return 0 if self.minvalue is not None and result < self.minvalue: - tkMessageBox.showwarning( + messagebox.showwarning( "Too small", "The allowed minimum value is %s. " "Please try again." % self.minvalue, @@ -307,7 +307,7 @@ class _QueryDialog(Dialog): return 0 if self.maxvalue is not None and result > self.maxvalue: - tkMessageBox.showwarning( + messagebox.showwarning( "Too large", "The allowed maximum value is %s. " "Please try again." % self.maxvalue, |