I am trying to load a file into memory using this:
import mmap with open(path+fileinput+'example.txt', 'rb') as f: fileinput = mmap.mmap(f.fileno(), 0, prot=mmap.PROT_READ)
When I run the code, the error is:
AttributeError: 'module' object has no attribute 'PROT_READ'
source share