, ,dirlist = os.listdir(ph)
, ,dirlist.sort()
, ,for i in dirlist:
, , , ,adr = os.path.join(ph, i)
, , , ,if os.path.isdir(adr):
, , , , , ,parse_dir(adr)
, , , ,else:
, , , , , ,hh = ph[ln:]
, , , , , ,tree.append(hh+'|'+ str(os.path.getsize(adr))+'|'+i+ '\n')
#********************************************************
path = os.getcwd()
ln = len(path) + 1
LoadFile('NeBaza.txt', Books)
parse_dir(path)
for i in range(len(Books), 0, -1): # удаление из списка
, ,if (Books[i-1].find('|Y|')>0) or (Books[i-1].find('|Z|')>0):
# , , , ,print(Books[i-1])
, , , ,Books.pop(i-1) # ранее удаленных книг
for i in Books:
, ,m = i.split('|')
, ,L.append(m[4].strip()+'|-'+my_name(m[0])+'\n')
for i in range(len(L), 0, -1):
, ,FindInTree(L[i-1].strip(), i-1)
, ,
for i in range(len(tree), 0, -1):
, ,s = tree[i-1].strip()
, ,if (s[-1] != 'p') and (s[-1] != '2'):