# 		'./textDirectory/lec04.txt','./textDirectory/lec05.txt','./textDirectory/lec06.txt',
# 		'./textDirectory/lec07.txt','./textDirectory/lec08.txt','./textDirectory/lec09.txt',
# 		'./textDirectory/lec10.txt','./textDirectory/lec11.txt','./textDirectory/lec12.txt',
# 		'./textDirectory/lec13.txt','./textDirectory/lec14.txt','./textDirectory/lec17.txt',
# 		'./textDirectory/lec16.txt','./textDirectory/lec18.txt','./textDirectory/lec19.txt',
# 		'./textDirectory/lec20.txt','./textDirectory/lec21.txt','./textDirectory/lec23.txt']

listFileSize = []
timeSize = []
listFileSizeString = []
timeSizeString = []
for txt in files:
	fileSize = os.path.getsize(txt)/1024
	newFiles = [[txt],[]]
	start_time = time.time()
	populateDict.populateDict(newFiles);
	populateDictTime = time.time() - start_time
	#print( 'Function populateDict ' , populateDictTime, 'sec for file size ', fileSize)
	listFileSizeString.append(str(fileSize))
	timeSizeString.append(str(populateDictTime))
	listFileSize.append(fileSize)
	timeSize.append(populateDictTime)

fileSizeSortedString = copy.deepcopy(listFileSizeString)
fileSizeSortedString.sort(key=float)
fileSizeIndex = [listFileSizeString.index(x) for x in fileSizeSortedString]
timeSorted = [timeSize[y] for y in fileSizeIndex]
fileSizeSorted = sorted(listFileSize)

#print(listFileSize)
#print(timeSize)
indirName = "Input Directory "+utility.indir;
outputFile = "Output File "+utility.outfile;
utility.verbosePrint(indirName, utility.verbose)
utility.verbosePrint(outputFile, utility.verbose)

# Calculate getAllFilesinDir time 
start_time = time.time()
reqFiles = printHTMLList.getAllFilesinDir(utility.indir);
reqFilesTime = time.time() - start_time
stmt = "Function getAllFilesinDir "+str(reqFilesTime)+"sec"
utility.verbosePrint(stmt, utility.verbose)

# Calculate populateDict time
start_time = time.time()
words = populateDict.populateDict(reqFiles);
populateDictTime = time.time() - start_time
stmt = "Function populateDict "+str(populateDictTime)+"sec"
utility.verbosePrint(stmt, utility.verbose)

# Calculate printToHTMLCompleteList time
start_time = time.time()
printHTMLList.printToHTMLCompleteList(words, utility.outfile);
printToHTMLCompleteListTime = time.time() - start_time
stmt = "Function printToHTMLCompleteList "+str(printToHTMLCompleteListTime)+"sec"
utility.verbosePrint(stmt, utility.verbose)

if utility.minifyOpt:
	minify.minifyFile(utility.outfile, utility.outfile)

# ## Optional
Пример #3
0
# 		'./textDirectory/lec04.txt','./textDirectory/lec05.txt','./textDirectory/lec06.txt',
# 		'./textDirectory/lec07.txt','./textDirectory/lec08.txt','./textDirectory/lec09.txt',
# 		'./textDirectory/lec10.txt','./textDirectory/lec11.txt','./textDirectory/lec12.txt',
# 		'./textDirectory/lec13.txt','./textDirectory/lec14.txt','./textDirectory/lec17.txt',
# 		'./textDirectory/lec16.txt','./textDirectory/lec18.txt','./textDirectory/lec19.txt',
# 		'./textDirectory/lec20.txt','./textDirectory/lec21.txt','./textDirectory/lec23.txt']

listFileSize = []
timeSize = []
listFileSizeString = []
timeSizeString = []
for txt in files:
    fileSize = os.path.getsize(txt) / 1024
    newFiles = [[txt], []]
    start_time = time.time()
    populateDict.populateDict(newFiles)
    populateDictTime = time.time() - start_time
    #print( 'Function populateDict ' , populateDictTime, 'sec for file size ', fileSize)
    listFileSizeString.append(str(fileSize))
    timeSizeString.append(str(populateDictTime))
    listFileSize.append(fileSize)
    timeSize.append(populateDictTime)

fileSizeSortedString = copy.deepcopy(listFileSizeString)
fileSizeSortedString.sort(key=float)
fileSizeIndex = [listFileSizeString.index(x) for x in fileSizeSortedString]
timeSorted = [timeSize[y] for y in fileSizeIndex]
fileSizeSorted = sorted(listFileSize)

#print(listFileSize)
#print(timeSize)