Support for Python3

Translation was made with 2to3 script. Python 2.7 is still working