Skip to content

python 3 upgrade;few code semantics;new py3 bytes vs all string in py2#304

Closed
yahavb wants to merge 1 commit into
fogleman:masterfrom
yahavb:master
Closed

python 3 upgrade;few code semantics;new py3 bytes vs all string in py2#304
yahavb wants to merge 1 commit into
fogleman:masterfrom
yahavb:master

Conversation

@yahavb

@yahavb yahavb commented Dec 12, 2022

Copy link
Copy Markdown

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

yahavb commented Dec 12, 2022

Copy link
Copy Markdown
Author

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