compatibility with python 3.x

d
Merge pull request #173 from ivantchomgue/patch-9

compatibility with python 3.x