不擦出之前写入的,继续在之前的文档中写入
import os
paths= "/home/li/data/data_无全黑边缘/train/aug_gt_scale_0.7/3"
f=open('aug_gt.txt', 'a')
filenames=os.listdir(paths)
filenames.sort()
for filename in filenames:
out_path="train/aug_gt_scale_0.7/3/" + filename
print(out_path)
f.write(out_path+'\n')
f.close()