I would like to write some text to file but coded as binary so that the text is not immediately visible with a text editor.
I followed this tutorial, but:
What is the right way to write text to a binary file?
I followed this tutorial, but:
Output:# in python3
with open('mybinfile.bin', 'wb') as fl:
text = 'Hello InfinityQuest!'
fl.write(text.encode('utf-8'))
# in shell
$ cat mybinfile.bin
Hello InfinityQuest!
So there has been no encoding.What is the right way to write text to a binary file?