aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavian Hautbois <flavianh@sicara.com>2019-07-26 03:30:33 +0200
committerTerry Jan Reedy <tjreedy@udel.edu>2019-07-25 21:30:33 -0400
commit76b645124b3aaa34bc664eece43707c01ef1b382 (patch)
tree10aaa3e7e89080bd68128c4de544050599d261bf /Lib/tkinter/filedialog.py
parentbpo-37641 preserve relative file location in embeddable zip (GH-14884) (diff)
downloadcpython-76b645124b3aaa34bc664eece43707c01ef1b382.tar.gz
cpython-76b645124b3aaa34bc664eece43707c01ef1b382.tar.bz2
cpython-76b645124b3aaa34bc664eece43707c01ef1b382.zip
bpo-29446: tkinter 'import *' only imports what it should (GH-14864)
Add __all__ to tkinter.__init__ and submodules. Replace 'import *' with explicit imports in some submodules.
Diffstat (limited to 'Lib/tkinter/filedialog.py')
-rw-r--r--Lib/tkinter/filedialog.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/tkinter/filedialog.py b/Lib/tkinter/filedialog.py
index d9d3436145c..dbb97dd5777 100644
--- a/Lib/tkinter/filedialog.py
+++ b/Lib/tkinter/filedialog.py
@@ -11,14 +11,20 @@ to the native file dialogues available in Tk 4.2 and newer, and the
directory dialogue available in Tk 8.3 and newer.
These interfaces were written by Fredrik Lundh, May 1997.
"""
+__all__ = ["FileDialog", "LoadFileDialog", "SaveFileDialog",
+ "Open", "SaveAs", "Directory",
+ "askopenfilename", "asksaveasfilename", "askopenfilenames",
+ "askopenfile", "askopenfiles", "asksaveasfile", "askdirectory"]
-from tkinter import *
+import fnmatch
+import os
+from tkinter import (
+ Frame, LEFT, YES, BOTTOM, Entry, TOP, Button, Tk, X,
+ Toplevel, RIGHT, Y, END, Listbox, BOTH, Scrollbar,
+)
from tkinter.dialog import Dialog
from tkinter import commondialog
-import os
-import fnmatch
-
dialogstates = {}