Fix python3 compatibility and pep8
2 files changed