Apr-26-2017, 12:31 AM
Apr-26-2017, 11:21 AM
Found the following code on stackoverflow:
here
I'll report back on how it works
here
import mmap import re with open('somefile', 'rb') as fin: mf = mmap.mmap(fin.fileno(), 0, access=mmap.ACCESS_READ) markers = re.finditer('(.*?)MARKER', mf) for marker in markers: print (marker.group(1))This looks like exactly what I'm looking for ... Now to test
I'll report back on how it works
Apr-26-2017, 12:03 PM
The only thing I remember about mmap is that it allows me to make a storage in memory and use it like a real one. If I am not wrong. I'm not on the Earth right now. Don't feel well
Apr-26-2017, 02:57 PM
That is correct.
I know how that works,
what I was trying to do was place markers in the memory map with re.finditer
so that I could extract any of the 170,000 items that are in it.
I've since succeeded, so am OK
I know how that works,
what I was trying to do was place markers in the memory map with re.finditer
so that I could extract any of the 170,000 items that are in it.
I've since succeeded, so am OK