-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 2. #5
Comments
Are you asking how to convert your code to python 3? |
no, i just do not think i could convert all code of the repo. |
There isn't much to do in order to make the codes compatible in Python 3.x In To fix this cast the value to GRID_WIDTH = int(SCREEN_WIDTH / GRIDSIZE)
GRID_HEIGHT = int(SCREEN_HEIGHT / GRIDSIZE) As for So you'd have to change except pygame.error, message:
print 'Cannot load image:', fullname
raise SystemExit(message) to # Catch the exception and assign it to the "error" variable
except pygame.error as error:
# Here you just need the parenthesis
print('Cannot load image: ', fullname)
# Throw the exception with the error message
raise SystemExit(error) The second one is more of a warning because the So you'd have to change if colorkey is -1: to if colorkey == -1: |
Python 2 should not be used. Period. Fix: Convert all code. @ternus
The text was updated successfully, but these errors were encountered: