Page 290 -
P. 290

building a graphical user interface


                              Your Programming Toolbox


                               You’ve got Chapter 7 under your
                                belt. Let’s look back at what
                                you’ve learned in this chapter:                                                 CHAPTER 7





                Programming T ools

                * Using a third-party programming


                 library
                 * Playing with a sound library
                 * Event loops - respond to events

                  when they occur                          Python T ools
                   * Event handler - code that executes

                   when a certain event occurs
                    * GUI - a graphical user interface    * pygame - a professional-level set of
                                                          gaming libraries that support sound
                    (looks nice, doesn’t it?)
                     * Widget - a GUI interface element   * break - exit from a loop
                                                          * pass - a piece of code that does nothing


                                                         * tkinter - a standard library for
                                                          creating GUIs
                                                         * Tk() - a blank GUI app

                                                         * Button() - a tkinter button widget

                                                         * Label() - a tkinter label widget
                                                        * IntVar() - a tkinter integer variable
                                                        that can update the GUI “as if by magic”














                                                                                       you are here 4    255
   285   286   287   288   289   290   291   292   293   294   295