Pep8 cleanup for example.py in the documentation

Use the gcc compiler for the example, so we will be able to have
a test running it on travis
Use print() functions to make the exampke compatible with python 3