Make library python3 compatible.
Merge branch 'python3'