Add Python 3 support

Signed-off-by: Jerome Flesch <jflesch@gmail.com>