Python code for PiFace products can be written in two ways, using a python interpreter shell or by writing and saving your program with a text editor.
Start a new python interpreter by typing
python3 (depending on whether you have installed PiFace software for python or python3) into a Terminal. Type your python commands after you see the python prompt
>>>. The commands will execute one by one as you enter them, unless they are contained inside control statements such as
This is a great way to test bits of code and explore the different features of PiFace products.
To create a python program type
Open this file in your favourite text editor, eg:
Write your code in this file and Save it. Then run it with the command