标签:
import os savecwd = os.getcwd(); print "savecwd = ",savecwd def list_dir(root,filefind ,folderfind ): if(os.path.isdir(root)): if folderfind : folderfind(root) elif os.path.isfile(root): if filefind: filefind(root); return; else: return; dir_lists = os.listdir(root) for dir in dir_lists: fullname = root + "/" + dir list_dir(fullname,filefind,folderfind)
标签:
原文地址:http://my.oschina.net/lyr/blog/411628