Python 3

A new pull request to merge into the nolta:python3 branch. Supersedes pull #52.