I'm writing a program with Python 3 and tkinter in which toplevels initially appear centered in the root window. If a toplevel isn't moved out of the way, it covers up any messagebox that may arise to display an error message. The messagebox appears in front of the root window, but behind the toplevel. Simple example from the command line to show what happens:
>>> from tkinter import *
>>> from tkinter import messagebox
>>> root = Tk()
>>> texto = Toplevel(root) # (Manually put toplevel in front of root)
>>> messagebox.showinfo(message='Does this work?')
Is there a way to get the messagebox to appear in front of the toplevel?