我尝试使用以下代码将一个文件加载到内存中:
当我运行代码时出现错误:
我尝试使用以下代码将一个文件加载到内存中:
import mmap
with open(path+fileinput+'example.txt', 'rb') as f:
fileinput = mmap.mmap(f.fileno(), 0, prot=mmap.PROT_READ)
当我运行代码时出现错误:
AttributeError: 'module' object has no attribute 'PROT_READ'