Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python : search file for string

import mmap

with open('example.txt') as f:
    s = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
    if s.find('blabla') != -1:
        print('true')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #search #file #string
ADD COMMENT
Topic
Name
3+6 =