-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add examples for handling strings and bytes with python bindings #67
Comments
So I am trying to understand what you mean here, but when I do: str_msg = "HELLO!"
server.send_bytes(str_msg)
str_msg = client.receive_bytes()
print(str_msg)
time.sleep(0.4) I get The theory is explained as: https://realpython.com/lessons/defining-literal-bytes-object/ |
You can have a look at the tests, it is indeed expected that you get |
I understand. Sorry I think I misworded my question. What I meant to ask was, is this what the issue should deal with? I provide examples like this in the readme? I am not particularly sure what the problem referred to in #66 is exactly. Is it the problem of "extra information" added around a byte literal, that we have decode/sanitize the received data. |
Yeah, the goal is just to provide a code snippet that shows how to use this library. |
As proposed in #66, it would be nice to clarify the usage of the Python bindings regarding the reception and sending of bytes vs strings.
An example snippet could go into the README
The text was updated successfully, but these errors were encountered: