Book Image

Raspberry Pi cookbook for Python programmers

Book Image

Raspberry Pi cookbook for Python programmers

Overview of this book

Table of Contents (18 chapters)
Raspberry Pi Cookbook for Python Programmers
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


Until now, we have focused purely on command-line applications; however, there is much more to the 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 more natural 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 that provides a good range of controls (also referred to as widgets) and tools for creating graphical applications.

First, we will take our previous example, the encryptdecrypt.py module discussed in the How to do it… section in the Working with text and strings recipe in Chapter 2, Starting with Python Strings, Files, and...