if __name__ ='__main__'olddialogdemo(mainloop(if you supply dialog tuple of button labels and messageyou get back the index of the button pressed (the leftmost is index zerodialog windows are modalthe rest of the application' windows are disabled until the dialog receives response from the user when you press the pop button in the main window created by this scriptthe second dialog pops upas shown in figure - figure - old-style dialog this is running on windowsand as you can seeit is nothing like what you would expect on that platform for question dialog in factthis dialog generates an windows look-and-feelregardless of the underlying platform because of both dialog' appearance and the extra complexity required to program ityou are probably better off using the standard dialog calls of the prior section instead custom dialogs the dialogs we've seen so far have standard appearance and interaction they are fine for many purposesbut often we need something bit more custom for exampleforms that request multiple field inputs ( nameageshoe sizearen' directly addressed by the common dialog library we could pop up one single-input dialog in turn for each requested fieldbut that isn' exactly user friendly custom dialogs support arbitrary interfacesbut they are also the most complicated to program even sothere' not much to it--simply create pop-up window as toplevel with attached widgetsand arrange callback handler to fetch user inputs entered in the dialog (if anyand to destroy the window to make such custom dialog modalwe also need to wait for reply by giving the window input focusmaking other windows inactiveand waiting for an event example - illustrates the basics example - pp \gui\tour\dlg-custom py import sys from tkinter import makemodal (len(sys argv dialogs