Search for a string in binary files

John Hunter jdhunter at
Tue Jul 22 16:10:49 CEST 2003

>>>>> "hokieghal99" == hokieghal99  <hokiegal99 at> writes:

    hokieghal99> And, would it be more efficent (faster) to just call
    hokieghal99> grep from python to do the searching?

Depending on how you call grep, probably.  If you respawn grep for
each file, it might be slower than the python solution.  If you first
build the file list of all the files you want to search and then call
grep on all the files simultaneously, it will likely be a good bit
faster.  But you will have to deal with issues like quoting spaces in
filenames, etc....


More information about the Python-list mailing list