参考:http://blog.csdn.net/zcwfengbingdongguke/article/details/13951527 代码: #!/usr/bin/python import os import re #list files def listFiles(dirPath): fileList=[] for root,dirs,files in os.walk(dirPath): for fileObj in files: fileList.append(os.path.join…