mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Really move the imports to the top this time. :)
This commit is contained in:
parent
3ee81df3bb
commit
f4a942c980
1 changed files with 3 additions and 4 deletions
|
@ -24,6 +24,9 @@ askstring -- get a string from the user
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from tkinter import *
|
from tkinter import *
|
||||||
|
from tkinter import messagebox
|
||||||
|
|
||||||
|
import tkinter # used at _QueryDialog for tkinter._default_root
|
||||||
|
|
||||||
class SimpleDialog:
|
class SimpleDialog:
|
||||||
|
|
||||||
|
@ -254,7 +257,6 @@ class _QueryDialog(Dialog):
|
||||||
parent = None):
|
parent = None):
|
||||||
|
|
||||||
if not parent:
|
if not parent:
|
||||||
import tkinter
|
|
||||||
parent = tkinter._default_root
|
parent = tkinter._default_root
|
||||||
|
|
||||||
self.prompt = prompt
|
self.prompt = prompt
|
||||||
|
@ -284,9 +286,6 @@ class _QueryDialog(Dialog):
|
||||||
return self.entry
|
return self.entry
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
|
||||||
from tkinter import messagebox
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = self.getresult()
|
result = self.getresult()
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue