I am trying to make a python script that encodes any file into a txt file. So far I can encode an input file into a txt file that contains the original files name, content and a sha hash for integrity checking (if you wish I can dump the code so far here).
Currently, I just make a standard list and dump said list into a txt file.
However, when reading from the list I get strings, but have no way of casting the string into a "byte like object", and a Google search only shows conversion (cast and convert are different) methods.
Is there any way to cast the string in the way you can do str(variable)
?
Also, on a side note: does "rb" include metadata, title, etc?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…