Invoking the Python interpreter

We have installed the most updated versions of the most important libraries we required to interact with the features included in the Intel Galileo Gen 2 board. Now, we can invoke the Python interpreter by typing the classic command:

python

Now, enter the following two lines of Python code:

import mraa
mraa.getVersion()

The Python interpreter will display the following output:

'v0.9.0'

We imported the mraa library and called the mraa.getVersion method to check whether Python is able to retrieve the installed version of the mraa library. The result of calling the method displays the version we installed for the mraa library, and therefore, we know that Python is going to work with the version we expect. Note that the Python ...

Get Internet of Things with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.