Return the path name of the window whose identifier is id. If displayof is given, the identifier is looked up on the display of that window; otherwise it is looked up on the display of the application’s main window.
tkinter/Misc.winfo_pathname
Misc.winfo_pathname