buffer读到的是4096个字节,我想把4095个字节写入新的文件。复制代码
- infile = open(infilename, 'rb')
- outfile = open(outfilename, 'wb')
- while True:
- buffer = bytearray(infile.read(0x4096))
- length = len(buffer)
- if not buffer:
- break
欢迎光临 批处理之家 (http://bbs.bathome.net/) | Powered by Discuz! 7.2 |