python 读取全部文件名以及路径,添加固定字符,并且输出到txt
import os
txtName = "negatives.txt"
f=file(txtName, "a+")
dire="/home/a123/Downloads/OpenCV-Haar-AdaBoost-master/negative_images"
#anchor="/home/a123/Downloads/OpenCV-Haar-AdaBoost-master/positive_images"
for root ,dirs, files in os.walk