mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 16:57:54 +00:00
20 lines
405 B
Python
20 lines
405 B
Python
|
import glob
|
||
|
|
||
|
def processFile(f,t):
|
||
|
data = open(f,'rb').read()
|
||
|
lines = data.replace('\r\n','\n').split('\n')
|
||
|
lines_found = []
|
||
|
for i,x in enumerate(lines):
|
||
|
if t in x:
|
||
|
lines_found.append(i+1)
|
||
|
|
||
|
return lines_found
|
||
|
|
||
|
term = raw_input('>')
|
||
|
for x in glob.glob('../otp/*/*.py'):
|
||
|
r = processFile(x,term)
|
||
|
if r:
|
||
|
print x,r
|
||
|
|
||
|
raw_input('*****')
|