Python for Kids on the Raspberry Pi

10 Jan, 2013

I finally managed to find enough bits-and-pieces to get a Raspberry Pi (borrowed from a friend - thanks Matt!) up and running, in order to test out the code from Python for Kids. A USB charger for an old Nokia phone, a somewhat dodgy-looking USB power adaptor from the bottom of a cobweb-filled box in the back room, a wireless mouse (the base for which had managed to hide itself on the opposite side of the house), a bent network cable (surprisingly still functional), and a powerline adaptor scavenged from the TV. In the end the only thing missing was a USB keyboard, which finally arrived in the mail this morning.

Raspbian menu It looks like all the code works fine, and Python3 is installed by default on the Raspbian operating system, so there's not a lot required to install out of the box. There is one thing to be aware of - do not use the IDLE3 icon which is on the desktop by default (at least not when you're running the graphics code in the book). Instead, go to the Other menu, and choose IDLE (Python 3.2) (click on the screenshot to see what you should be looking for). This runs IDLE in "No subprocess" mode, so modules such as turtle will run correctly.

However, to use GIMP (the graphics program we use in Chapter 15), you will need to install it first:

  1. Make sure your Raspberry Pi is connected to the internet
  2. Open a terminal (select the Other menu, and then LXTerminal)
  3. Update the package list (might not be necessary, but just in case) by entering the following command:
    sudo apt-get update
  4. Once completed, install GIMP by running this command:
    sudo apt-get install gimp

After installation, you'll find a new menu option in the Graphics menu: GNU Image Manipulation Program.

That should be all you need to get started with the Raspberry Pi.