base64 python3 adaptation