Skip to content
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 3 upgrade;few code semantics;new py3 bytes vs all string in py2 #304

Closed
wants to merge 1 commit into from

Conversation

yahavb
Copy link

@yahavb yahavb commented Dec 12, 2022

love this Craft game to demonstrate stateful multiplayer game. I upgraded the python version from v2 to v3.
The fix is twofold. 1/ python3 library semantics e.g., Queue vs queue or SocketServer vs socketserver, thread.setDaemon(True) vs thread.daemon= True.
2/ in Python 3; strings are now always Unicode so needed to decode bytes from client to string class Handler and encode back before self.request.sendall(str.encode(data))

@yahavb
Copy link
Author

yahavb commented Dec 12, 2022

I just noticed #302 did it already so closing this one

@yahavb yahavb closed this Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant