Book Image

Raspberry Pi Essentials

By : Jack Creasey
Book Image

Raspberry Pi Essentials

By: Jack Creasey

Overview of this book

Table of Contents (15 chapters)
Raspberry Pi Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Project 3 – Implementing a TKinter GUI for the Internet radio


TKinter is a standard GUI framework for Python and extends the command-line driven Python interface to a window-based interface. Window-based interfaces are typically user event driven, and this significantly reduces the amount of programming required to design a GUI. In the case of a TKinter/Python application, the task is split into roughly the following components:

  • UI definition and initialization code: This is typically a collection of frames, buttons, textboxes, dialogs, canvases, and so on, which are positioned in a TK window.

  • Definition and initialization of event handlers: Since the UI responds directly to the user input (mouse/touch or keyboard actions), the event handlers perform all the actions required by the event. For example, pressing a button on the UI could perform all the actions required if the event handler had code for it. In many cases, however, there may be messages transferred to other tasks (threads) that...