mport os
def findExtension(path,el):
if(os.path.exists(path)):
try:
items=os.listdir(path)
for item in items:
if(os.path.isfile(os.path.join(path,item))):
print (item,el)
else:
findExtension(os.path.join(path,item),el)
except Exception,message:
print message
py查询文件方法例子
时间: 2024-10-13 08:21:00