K
kj
Hi. I need to implement, within a Python script, the same
functionality as that of Unix's
grep -rl some_string some_directory
I.e. find all the files under some_directory that contain the string
"some_string".
I imagine that I can always resort to the shell for this, but is
there an efficient way of doing it within Python?
(BTW, portability is not high on my list here; this will run on a
Unix system, and non-portable Unix-specific solutions are fine with
me.)
TIA!
--
functionality as that of Unix's
grep -rl some_string some_directory
I.e. find all the files under some_directory that contain the string
"some_string".
I imagine that I can always resort to the shell for this, but is
there an efficient way of doing it within Python?
(BTW, portability is not high on my list here; this will run on a
Unix system, and non-portable Unix-specific solutions are fine with
me.)
TIA!
--