Return the path name of the widget’s parent, or an empty string if the widget is the main window of the application.
tkinter/Misc.winfo_parent
Misc.winfo_parent