from tkinter import from tkinter import mygui main app window mainwin tk(label(mainwintext=__name__pack(popup window popup toplevel(label(popuptext='attach'pack(side=leftmygui(popuppack(side=rightmainwin mainloop(attach my frame this example attaches our one-button gui to larger windowhere toplevel popup window created by the importing application and passed into the construction call as the explicit parent (you will also get tk main windowas we'll learn lateryou always dowhether it is made explicit in your code or notour one-button widget package is attached to the right side of its container this time if you run this liveyou'll get the scene captured in figure - the "pressbutton is our attached custom frame figure - attaching guis moreoverbecause mygui is coded as classthe gui can be customized by the usual inheritance mechanismsimply define subclass that replaces the parts that differ the reply methodfor examplecan be customized this way to do something uniqueas demonstrated in example - example - pp \preview\customizegui py from tkinter import mainloop from tkinter messagebox import showinfo from tkinter import mygui step adding gui