#!/usr/bin/env python # import required modules: # note that the path to the module htkmfc must be included in the # PYTHONPATH environment variable. # import os import sys # main: this is the main function of this Python # def main(argv): flist = [] for root, dirs, files in os.walk(sys.argv[1]): #print("root = %s" % (root)) #print("dirs = ", dirs) #print("files = ", files) for file in files: #print("file =", file) ffname = root + "/" + file flist.append(ffname) print("%s: size = %d" % (ffname, os.path.getsize(ffname))) #print("%s" % (ffname)) print("---") #print("all of the files found are:") #print(flist) # begin gracefully # if __name__ == "__main__": main(sys.argv[0:]) # # end of file