limited python3 compatibility

very limited