Allow python3 compatibility