Reputation: 984
When you have this code already:
from tkinter import *
Assuming that this code means that it imports everything from the tkinter module, why doesn't it import tkinter messagebox. I'd have to use this seperate code for it to work:
from tkinter import messagebox
Upvotes: -1
Views: 887
Reputation: 385960
That's simply the way the package was designed to work. The author of tkinter decided that importing "*" wouldn't import messagebox, or some of the other packages (ttk
is another example)
Generally speaking, you should never do import *
anyway.
Upvotes: 2