Reader small image

You're reading from  Raspberry Pi Projects for Kids

Product typeBook
Published inMar 2014
Publisher
ISBN-139781783982226
Edition1st Edition
Right arrow
Author (1)
Daniel Leonard Bates
Daniel Leonard Bates
author image
Daniel Leonard Bates

Daniel Bates is a computer science researcher at the University of Cambridge. His day job involves inventing designs for future mobile phone processors and when he gets home, he likes playing games or working on one of his coding projects (or both!). Daniel has been a volunteer for the Raspberry Pi Foundation since 2011 and is enthusiastic about introducing new people to computing. He has previously written Instant Minecraft: Pi Edition Coding How-to and Raspberry Pi Projects for Kids (First Edition), both published by Packt Publishing.
Read more about Daniel Leonard Bates

Right arrow

Hello world!


As is traditional when we learn about a new technology, we're going to start with the simplest program possible, just to make sure that we understand the basics. In this case, we're going to create a basic window with a title and some text inside.

Tkinter

There are many different Python modules available that let us create graphical programs, but we're going to use one called Tkinter. This module is included with Python by default and works on almost all computers and operating systems.

Tkinter has easy-to-use functions to create textboxes, buttons, scroll bars, menus, and more. Collectively, these components are called widgets. To create a graphical user interface, we combine a number of widgets with a layout, which tells Tkinter how the widgets should be arranged. For example, we could say that all of the buttons should be in a row or that they should be arranged vertically.

There is a summary of how to use the available widgets in the Extensions section at the end of this chapter...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Raspberry Pi Projects for Kids
Published in: Mar 2014Publisher: ISBN-13: 9781783982226

Author (1)

author image
Daniel Leonard Bates

Daniel Bates is a computer science researcher at the University of Cambridge. His day job involves inventing designs for future mobile phone processors and when he gets home, he likes playing games or working on one of his coding projects (or both!). Daniel has been a volunteer for the Raspberry Pi Foundation since 2011 and is enthusiastic about introducing new people to computing. He has previously written Instant Minecraft: Pi Edition Coding How-to and Raspberry Pi Projects for Kids (First Edition), both published by Packt Publishing.
Read more about Daniel Leonard Bates