如何批量获取文件路径
1 import glob 2 3 import os 4 5 def image_proc(): 6 7 for files in glob.glob('/home/xxx/filename/*.png') 8 9 filepath , filename = os.path.split(file) //获取文件路径 , 图片名 10 11 filterame , exts = os.path.splitext(filename) 12 13 outfile = '/home/xxx/' //输出文件路径 14 15