All pastes #80149 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-07-06 03:29 UTC
rendered paste body
subdir = r'W:/Mike_Lape/Antibody/Docking/Cocaine and Analogues ChemScore\norcocaine_m1'


int_file = 0
list_files = [i.strip() for i in open(r'C:\Output\bestranking.lst')]
for file in list_files:
    print file[1:len(subdir)]
    if file.find(subdir) > 0:
	print 'We need to delete:', file
	del(list_files[int_file])

    int_file += 0


 #Write the new file
replacement = open(r'C:\Output\bestranking.lst', 'w')
replacement.write('\n'.join(list_files))
replacement.close()