Python 2.7 compatability

Now this same code can be run with either Python2.7 or Python3.