2017年7月29日

python遍历文件夹下的文件

摘要: 在读文件的时候往往需要遍历文件夹,python的os.path包含了很多文件、文件夹操作的方法。下面列出: os.path.abspath(path) #返回绝对路径 os.path.basename(path) #返回文件名 os.path.commonprefix(list) #返回多个路径中, 阅读全文

posted @ 2017-07-29 17:57 HelloShijam 阅读(1629) 评论(0) 推荐(0) 编辑

导航