Compatible with python 3

I have not installed python 2, please test for it. This work in python 3.