python遍历文件夹
2015-10-23 21:28
483 查看
直接给出一个小栗子吧
<pre name="code" class="html">import os XML_DIR = 'Annotations/' file_list = os.walk(XML_DIR) for root, dirs, files in file_list: for f in files: pass for d in dirs: pass
相关文章推荐
- Python + Android + Uiautomator自动化测试
- python模块包调用解析
- python读取xml数据
- Python调用nmap扫描网段主机信息生成xml
- Python深入:Distutils安装包
- 流动python - 一个极简主义event制
- C#调用Python语言
- 【Python爬虫实战--3】html写正则表达式
- python例子-Django之模型(Model_数据库)
- Python深入:修改Python搜索路径
- python opencv入门(读 / 写 显示以及转换图像 和 视频读入)
- python链接postgresql数据库
- python中的else子句
- windows下面安装Python和pip
- python爬取网易评论
- Python lambda 匿名函数 (二十二)
- 人们为什么不使用Python3?
- Python -- 文档测试
- python copy 深拷贝与浅拷贝
- 通过编写聊天程序来熟悉python中多线程及socket的用法