Python 3 compatibility

The first solution is with automatic 2to3 conversion by setup.py (but a better solution is comming)