你看了模块io.bytesio吗? 你可以在这里找到它: https://docs.python.org/release/3.1.3/library/io.html#binary-i-o 您可以设置缓冲区大小,这解决了我的内存问题。