mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
c4cda4369f
commit
76b645124b
12 changed files with 52 additions and 15 deletions
|
@ -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 = {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue