根据关键字查找文件
import os
def getfile(path,word):
for filename in os.listdir(path):
file = os.path.join(path,filename)
if os.path.isfile(file) and word in filename:
print file
elif os.path.isdir(file):
getfile(file,word)
if __name__ == '__main__':
getfile(path,word)