Python3 support

reopened against correct branch. Please see #128 for previous discussions