标签:style blog color os for sp 文件 div on
#WalkDir函数枚举目录中所有目录和文件,参数(枚举目录输出列表,枚举文件输出列表,要枚举的目录) def WalkDir(dirlist,filelist,dirname): try: ls=os.listdir(dirname) except: print "Access Deny." else: for fn in ls: temp=os.path.join(dirname,fn) if (os.path.isdir(temp)): dirlist.append(temp) WalkDir(dirlist,filelist,temp) else: filelist.append(temp) return dirlist,filelist
标签:style blog color os for sp 文件 div on
原文地址:http://www.cnblogs.com/arhatlohan/p/4044449.html