Support python 3

I am not very competent in 2to3 migrations, but this seems to work.
The tests are ok with python 2 and with python 3.

Arthur


Edit: Sorry for the mess with the Travis builds, i had some trouble finding out how to make travis run the 2to3 conversion…