I am unsure what you mean by "have it pass as binary."
The code lineretrieves the string defined by myserver and then converts that to a binary string.Code:
server = b'secrets.myserver'
If that is your intent, then the answer to your question is yes.
Are you sure?
I'd expect that to return the literal bytes string (8 bit ASCII encoded) 'secrets.myserver'.
The b prefix to a string tells python to treat it as a byte string. It does not mean "binary".
To convert between byte and unicode string use bytes.decode() and str.encode() (or is it the other way around).
Statistics: Posted by thagrol — Sun Feb 09, 2025 10:51 pm




