O'Reilly logo

Banana Pro Blueprints by Tony Zhang, Ruediger Follmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Python

"Python is a programming language that lets you work quickly and integrate systems more effectively."

- Python website (http://www.python.org)

It is true that nearly no other interpreter language is as popular as Python. Additionally, there are a bunch of add-ons for Python that are available, ranging from a simple web server to complex graphics libraries. In this section, the reader will learn some basics of Python. We will use Python in order to program GPIO pins. We will look at a more complex example that will deal with graphical output in a window.

The basics

Before Python can be used, Python itself and the associated developer packages need to be installed:

sudo apt-get install python python-dev

For my examples, I've used 2.7.x version ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required