May-23-2019, 08:49 PM
May-23-2019, 09:30 PM
The second import is redundant.
May-23-2019, 09:37 PM
and the first import is flooding the namespace https://python-forum.io/Thread-Namespace...th-imports
May-23-2019, 11:04 PM
(May-23-2019, 09:37 PM)Yoriz Wrote: [ -> ]The second import is redundantIt's not redundant in this case,as ttk widgets was added to Tkinter later.
Therefor are
from tkinter import *
and from tkinter import tkk
different commands that import things from different modules.In doc they describe a override way doc
tkk doc Wrote:To override the basic Tk widgets, the import should follow the Tk import:It's bad that they did it this way with the usage
from tkinter import * from tkinter.ttk import *
*
in doc.Could have explain that it's different without using
*
import tkinter as tk from tkinter import ttk ... b1 = tk.Button(...) b2 = ttk.Button(...)
May-23-2019, 11:29 PM
Thanks snippsat.