Adding support for py3 (not sure if fully functionnal yet)