Python3 support

Added python3 support.