Introduction
Until now, we have focused purely on command-line applications; however, there is much more to Raspberry Pi than just the command line. By using graphical user interfaces (GUIs), it is often easier to obtain input from a user and provide feedback in a simpler way. After all, we continuously process multiple inputs and outputs all the time, so why limit ourselves to the procedural format of the command line when we don't have to?
Fortunately, Python can support this. Much like other programming languages, such as Visual Basic and C/C++/C#, this can be achieved using prebuilt objects that provide standard controls. We will use a module called Tkinter which provides a good range of controls (also referred to as widgets) and tools for creating graphical applications.
First, we will take an example, encryptdecrypt.py, and demonstrate how useful modules can be written and reused in a variety of ways. This is an example of good coding practice. We should aim to write code that can be tested thoroughly and then reused in many places.
Next, we will extend our previous examples by creating a small graphical Start menu application to run our favorite applications from.
Then, we will explore using classes within our applications to display and then to
organize photos.