Mholscher
(Menno Hölscher)
5
Steven d’Aprano assumed you had been doing this and also proposed a solution.
That is because tkinter.messagebox is a module. Import it as such:
>>> import tkinter as tk
>>> import tkinter .messagebox as mb
>>> dir(mb)
['ABORT', 'ABORTRETRYIGNORE', 'CANCEL', 'Dialog', 'ERROR', 'IGNORE', 'INFO', 'Message', 'NO', 'OK', 'OKCANCEL', 'QUESTION', 'RETRY', 'RETRYCANCEL', 'WARNING', 'YES', 'YESNO', 'YESNOCANCEL', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_show', 'askokcancel', 'askquestion', 'askretrycancel', 'askyesno', 'askyesnocancel', 'showerror', 'showinfo', 'showwarning']
>>>
…and there you see the messageboxes.