I have code that opens and reads a file from binary.
with open (file, mode="rb") as myfile:
message_string=myfile.read()
myfile.close
I now need to do the same thing reading from stdin. But I can't figure out how to read binary.
The error says byte strings only.
Any suggestions?