Chapter 1, Meet Tkinter, introduces us to the Tkinter library itself. We will look at ensuring that it is installed, how to use its widget system, and how to display widgets inside a window. Once the basics are down, we will have a play with some of the easier widgets, including using a Label widget to display text and a Button widget to provide interactivity.
Chapter 2, Back to the Command Line – Basic Blackjack, has us return to our roots as Python programmers and create a command-line only version of blackjack. This will get us up to speed with the common situation where we a command-line application, which we want to convert to a nicer interface. We will also discuss Python's class system and how to structure an application for conversion to a graphical interface.
Chapter 3, Jack is Back in Style – the Blackjack GUI, starts off the process of converting command-line blackjack to a graphical application. We will learn about the powerful Canvas widget and how we can use it to draw both shapes and images on the user's screen. This chapter will end with us having a working game of blackjack with a graphical interface.
Chapter 4, The Finishing Touches – Sound and Animation, teaches how to use the Canvas widget to create animations, which we will use to spruce up our game of blackjack. Of course, animations wouldn't be complete without accompanying sounds, so we will also have a look at how to play sound effects.
Chapter 5, Creating a Highly Customizable Python Editor, begins our second application, a text editor. We explore Tkinter's Text widget and its capabilities for handling events. We will also look at the themed widgets, which come with Tkinter in its ttk module, giving our applications a much more professional look.
Chapter 6, Color Me Impressed! – Adding Syntax Highlighting, covers how we can use Tkinter's tag system to affect different parts of certain widgets. We will be taking advantage of this system to add syntax highlighting for the Python language to our text editor. We will also explore the indexing system, which Tkinter uses to locate items inside some of its widgets.
Chapter 7, Not Just for Restaurants – All about Menus, teaches how we can add different types of menu to our applications—from the top menu bar that most applications have, to right-click context menus.
Chapter 8, Talk Python to Me – a Chat Application, begins our third and final application, an online instant messenger. We will learn how to plan the layout for a more complicated application, then piece together all of the different components needed for a chat program. We will also learn how to combine images and text by implementing smileys into the chat.
Chapter 9, Connecting – Getting our Chat Application Online, explains how we can use web technologies, including flask, requests, and sqlite3, to get desktop GUI applications communicating with the internet.
Chapter 10, Making Friends – Finishing our Chat Application, covers adding a friend's system and blocking system to improve socializing within our application. We will also learn how to manipulate images in Python using PIL by introducing user avatars. We will also learn why threads are great for computationally expensive or repeated tasks inside a GUI application.
Chapter 11, Wrapping Up – Packaging our Applications to Share, finishes off the book by briefly covering some widgets, which we did not get the opportunity to use in our three example application. Afterward, we will look at packaging a Python and Tkinter application up for distribution among users of the three biggest desktop operating systems, Windows, Linux, and macOS.