import os
def findStr(p, w):
for x in os.listdir(p): p1 = os.path.join(os.path.abspath(p),x) if w in x: print(p1) if os.path.isdir(p1): findStr(p1, w)
findStr(os.path.abspath('.'),'test')
Sign in to make a reply
和尚可以抽烟么
-_coding:utf-8 --
import os
def findStr(p, w):
findStr(os.path.abspath('.'),'test')