以二进制模式打开文件:
outputFile = open('testDS', 'wb')否则,文件对象可能会对二进制数据中显示的换行符进行魔术转换,从而导致其他字符被写入文件。参见例如https://docs.python.org/2/tutorial/inputoutput.html#reading-
and-writing-
files

以二进制模式打开文件:
outputFile = open('testDS', 'wb')否则,文件对象可能会对二进制数据中显示的换行符进行魔术转换,从而导致其他字符被写入文件。参见例如https://docs.python.org/2/tutorial/inputoutput.html#reading-
and-writing-
files