Add Python 3 support

Credits to @edschofield for the work.