Created Py 2 and 3 compatible version
Merge pull request #1 from le717/master

Python 2 and 3 compatible version