Fix Python 3 compatibility of examples.
Merge pull request #8 from ProgVal/python3-examples

Fix Python 3 compatibility of examples.