def countFolder(path): path = os.path.join(environment.getGitPath(), path) files = FileSystem.find(path, '^.*\.py$') counts = dict() count = 0 for file in files: base = os.path.basename(file) base = os.path.splitext(base)[0] if base in avoid: continue counts[base] = countFile(file) count += counts[base] print "... {0} -> {1}".format(count, path) print "" files = counts.keys() files.sort() for file in files: print "{0} : {1}".format(file, counts[file]) print "" return count
def parseFolder(path): label = path.split("/cgev/")[1] label = "cgev." + label.replace("/", ".") path = os.path.join(environment.getGitPath(), path) files = FileSystem.find(path, "^.*\.py$") print label for file in files: base = os.path.basename(file) if base in avoid: continue parseFile(os.path.join(path, base))