invoke invoke read input create gui process start event loop write output no event to processterminate yes classic console program process request to terminateno yes terminate classic gui program figure console programs versus gui programs concentrate on the gui programming aspects without distraction in the coverage of the bookmarks program we will see how to create custom dialogand how to create main window with menus and toolbarsas well as how to combine them all together to create complete working program both of the example programs use pure tkmaking no use of the ttk and tix librariesso as to ensure compatibility with python it isn' difficult to convert them to use ttkbut at the time of this writingsome of the ttk widgets provide less support for keyboard users than their tk cousinsso while ttk programs might look betterthey may also be less convenient to use but before diving into the codewe must review some of the basics of gui programming since it is bit different from writing console programs python console programs and module files always have py extensionbut for python gui programs we use pyw extension (module files always use pythoughboth py and pyw work fine on linuxbut on windowspyw ensures that windows uses the pythonw exe interpreter instead of python exeand this in turn ensures that when we execute python gui programno unnecessary console window will appear mac os works similarly to windowsusing the pyw extension for gui programs