Port to Python 3

Signed-off-by: Daniel Francis <francis@sugarlabs.org>