Use Python 3.x syntax

First step towards Python 3.x support.
Merge pull request #3 from yegorich/py2to3

Use Python 3.x syntax