diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-01-25 11:51:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 11:51:49 (GMT) |
commit | 7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1 (patch) | |
tree | 7261d03e8a5799b86c7b9b8508ac3670880cd2b5 /Lib/idlelib/runscript.py | |
parent | 96bcf6f4d4bed1cdf97883eb43e872ff1a92013d (diff) | |
download | cpython-7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1.zip cpython-7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1.tar.gz cpython-7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1.tar.bz2 |
bpo-43013: Fix old tkinter module names in idlelib (GH-24326)
Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and
'tkMessageBox' and remove 'tk'. Just lowercase 'tkFont' as 'font'
is already used. Adjust import.
(cherry picked from commit 879986d8a932c4524cb6ff822afc9537de16e28d)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/idlelib/runscript.py')
-rw-r--r-- | Lib/idlelib/runscript.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/idlelib/runscript.py b/Lib/idlelib/runscript.py index 028b0db..55712e9 100644 --- a/Lib/idlelib/runscript.py +++ b/Lib/idlelib/runscript.py @@ -14,7 +14,7 @@ import tabnanny import time import tokenize -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.config import idleConf from idlelib import macosx @@ -195,15 +195,15 @@ class ScriptBinding: def ask_save_dialog(self): msg = "Source Must Be Saved\n" + 5*' ' + "OK to Save?" - confirm = tkMessageBox.askokcancel(title="Save Before Run or Check", + confirm = messagebox.askokcancel(title="Save Before Run or Check", message=msg, - default=tkMessageBox.OK, + default=messagebox.OK, parent=self.editwin.text) return confirm def errorbox(self, title, message): # XXX This should really be a function of EditorWindow... - tkMessageBox.showerror(title, message, parent=self.editwin.text) + messagebox.showerror(title, message, parent=self.editwin.text) self.editwin.text.focus_set() self.perf = time.perf_counter() |