changing python code to support python 3
Merge pull request #141 from OpenGeoscience/fix-python3

Changing python code to support python 3