我的目标是读取二进制文件并将其转换为文本。我的代码是:
def binary_to_text(self,file_name):
open_file = open(file_name,"rb")
with open("Binary2Text.txt", "a") as the_file:
for line in open_file:
the_file.write(binascii.b2a_uu(line))
我收到此错误:
binascii.Error: At most 45 bytes at once
有没有办法解决这个问题,或者除了 binascii 之外我还可以使用其他模块吗?谢谢!