Add Python 3 support.

Sorry to respond only now, the mail was lost in my inbox...

Is there any good reason for this ? I don't know a lot about licenses, and if i remember correctly, I just copied the file from an other project (it was not copied from the original snipets)